-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.sh
executable file
·44 lines (36 loc) · 1.42 KB
/
script.sh
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
#! /bin/bash
dbs=("clickhouse" "influx" "victoriametrics")
for db in "${dbs[@]}"
do
echo "Generating data for $db"
if [ $db == "clickhouse" ]
then
cd clickhouse-insert
go run main.go
cd -
else
tsbs_generate_data --use-case="devops" --seed=123 --scale=8 \
--timestamp-start="2016-01-01T00:00:00Z" \
--timestamp-end="2016-01-02T00:00:00Z" \
--log-interval="1s" --format=$db \
| gzip > /tmp/$db-data.gz
cd $GOPATH/pkg/mod/github.com/timescale/[email protected]
NUM_WORKERS=1 BATCH_SIZE=15000 BULK_DATA_DIR=/tmp scripts/load/load_$db.sh
cd -
fi
done
query_modes=("1-1-1" "1-1-12" "1-8-1" "5-1-1" "5-1-12" "5-8-1")
for db in "${dbs[@]}"
do
for query_mode in "${query_modes[@]}"
do
echo "Generating queries for $db with query mode $query_mode"
tsbs_generate_queries --use-case="devops" --seed=123 --scale=8 \
--timestamp-start="2016-01-01T00:00:00Z" \
--timestamp-end="2016-01-02T00:00:01Z" \
--queries=10000 --query-type="single-groupby-"$query_mode --format=$db \
| gzip > /tmp/$db"-queries-single-groupby-"$query_mode.gz
cat /tmp/$db-queries-single-groupby-$query_mode.gz | \
gunzip | tsbs_run_queries_$db --workers=1 --print-interval=0
done
done