代码拉取完成,页面将自动刷新
stages:
- bench
bench-job:
stage: bench
tags:
- shell
script:
# update benchmark-result
- cd /home/gitlab-runner/benchmark-result
- git pull
- cd -
# delete cnosdb data
- set +e
- killall cnosdb
- set -e
- sudo rm -rf /home/gitlab-runner/cnosdb
# complie cnosdb
- echo "compile code"
- source ~/.cargo/env
- make build_release
# modify config and start cnosdb
- sleep 10
- ulimit -n 65535
- ulimit -a
- echo "modify default config"
- sed -i "s/tmp/home\/gitlab-runner/g" config/config_8902.toml
- echo "starting cnosdb"
- nohup ./target/release/cnosdb run --config ./config/config_8902.toml -M singleton > ./target/cnosdb_output.log 2>&1 &
- echo "cnosdb is running"
# hits test and update benchmark-result
- echo "hits test"
- commit_id=${commit_id:-$(git log -1 --pretty=%h)}
- cd benchmark
- export HITS_DATA_URL="/home/cnosdb_dev/hits.parquet"
- export TSBS_DATA_URL="/home/cnosdb_dev/cnosdb_iot_123_500000.gz"
- export TSBS_QUERY_DIR="/home/cnosdb_dev/queries"
- sudo mv ../target/release/cnosdb-cli /bin/
- ./benchmark.sh hits
- ./update-results.sh hits
- cp ./results/hits.html /home/gitlab-runner/benchmark-result/benchmark-hits/hits_${commit_id}.html
# tsbs test and update benchmark-result
- echo "tsbs test"
- ./benchmark.sh tsbs
- ./update-results.sh tsbs
- cp ./results/tsbs.html /home/gitlab-runner/benchmark-result/benchmark-tsbs/tsbs_${commit_id}.html
# push benchmark-result
- cd /home/gitlab-runner/benchmark-result
- git add .
- git commit -m "Add file hits_${commit_id}.html and tsbs_${commit_id}.html"
- git push
# save logs and clean env
- cd -
- cd ..
- set +e
- killall cnosdb
- set -e
- cp /home/gitlab-runner/cnosdb/1001/log/* /home/gitlab-runner/benchmark_results/logs/${commit_id}.log
- sudo rm -rf /home/gitlab-runner/cnosdb
- echo "bench job Done"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。