insertHistoricalRandomData.sh 917 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. #host=39.104.80.229
  3. host=127.0.0.1
  4. dbDataDir=/home/sudb/sudb/lib/sudb-data
  5. resultFile=./log/tsdb/out.log
  6. for dataCount in 1000000 2000000 3000000 5000000 10000000 20000000 30000000
  7. do
  8. echo "----test dataCountPerPoint:${dataCount}" | tee -a ${resultFile}
  9. echo delete all db data
  10. ./shell/tools/deleteAllDBData.sh
  11. diskSize=`du -sh ${dbDataDir}`
  12. echo before insert dataCountPerPoint:${dataCount} diskSize:${diskSize} | tee -a ${resultFile}
  13. java -cp ./lib/tsdb.jar demo.allInsert.InsertHistoricalRandomData \
  14. --host=$host --pointNamePrefix=pointName_ --pointCount=1 --dataCountPerPoint=$dataCount \
  15. --beginDate="2020-03-01 00:00:00" --period=1000 \
  16. --seed=1 --mean=10 --variance=0.1 --debug=0 2>&1 | tee -a ${resultFile}
  17. systemctl stop sourcedb
  18. diskSize=`du -sh ${dbDataDir}`
  19. echo after insert dataCountPerPoint:${dataCount} diskSize:${diskSize} | tee -a ${resultFile}
  20. done