From ecfdbab7602af262b0cab6e948a7d30bacc8b1e4 Mon Sep 17 00:00:00 2001 From: "xikai.wxk" Date: Thu, 13 Apr 2023 20:10:15 +0800 Subject: [PATCH] feat: tsbs support more write options --- scripts/run-tsbs.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run-tsbs.sh b/scripts/run-tsbs.sh index b19f230f75..c2952b7578 100755 --- a/scripts/run-tsbs.sh +++ b/scripts/run-tsbs.sh @@ -6,6 +6,8 @@ # - LOG_DIR # - CERESDB_CONFIG_FILE # - CERESDB_ADDR +# - WRITE_WORKER_NUM +# - WRITE_BATCH_SIZE export CURR_DIR=$(pwd) export DEFAULT_RESULT_FILE=${CURR_DIR}/tsbs/result.md @@ -14,6 +16,8 @@ export CERESDB_CONFIG_FILE=${CERESDB_CONFIG_FILE:-docs/minimal.toml} export LOG_DIR=${LOG_DIR:-${CURR_DIR}/logs} export CERESDB_ADDR=${CERESDB_ADDR:-127.0.0.1:8831} export CERESDB_PID_FILE=${CURR_DIR}/ceresdb-server.pid +export WRITE_WORKER_NUM=${WRITE_WORKER_NUM:-36} +export WRITE_BATCH_SIZE=${WRITE_BATCH_SIZE:500} # Where generated data stored export DATA_FILE=${DATA_FILE:-data.out} # How many values in host tag @@ -83,7 +87,7 @@ fi # Write data to ceresdb -./tsbs_load_ceresdb --ceresdb-addr=${CERESDB_ADDR} --file ${DATA_FILE} | tee ${LOG_DIR}/write.log +./tsbs_load_ceresdb --ceresdb-addr=${CERESDB_ADDR} --file ${DATA_FILE} --batch-size ${WRITE_BATH_SIZE} --workers ${WRITE_WORKER_NUM} | tee ${LOG_DIR}/write.log # Generate queries for query