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