blob: 225a58264a255f1cb7a32e63309e5657f2dc1bcf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# KqpRun tool
Tool can be used to execute queries by using kikimr provider.
For profiling memory allocations build kqprun with ya make flag `-D PROFILE_MEMORY_ALLOCATIONS -D CXXFLAGS=-DPROFILE_MEMORY_ALLOCATIONS`.
## Scripts
* `flame_graph.sh` - script for collecting flame graphs in svg format, usage:
```(bash)
./flame_graph.sh [graph collection time in seconds] [use sudo]
```
## Examples
### Queries
* Run select 42:
```(bash)
./kqprun --sql "SELECT 42"
```
* Queries shooting:
```(bash)
./kqprun --sql "SELECT 42" -C async --loop-count 0 --loop-delay 100 --inflight-limit 10
```
### Logs
* Setup log settings (`-C query` for clear logs):
```(bash)
./kqprun --sql "SELECT 42" -C query --log-default=warn --log KQP_YQL=trace --log-file query.log
```
* Trace opt:
```(bash)
./kqprun --sql "SELECT 42" -C query -T script
```
* Runtime statistics:
```(bash)
./kqprun --sql "SELECT 42" --script-statistics stats.log --script-timeline-file timeline.svg
```
### Cluster
* Embedded UI:
```(bash)
./kqprun -M 32000
```
Monitoring endpoint: http://localhost:32000
* gRPC endpoint:
```(bash)
./kqprun -G 32000
```
Connect with ydb CLI: `ydb -e grpc://localhost:32000 -d /Root`
* Static storage:
```(bash)
./kqprun -M 32000 --storage-path ./storage --storage-size 32
```
* Create serverless domain and execute query in this domain:
```(bash)
./kqprun -M 32000 --shared my-shared --serverless my-serverless --sql "SELECT 42" -D /Root/my-serverless
```
|