insertHistoricalRandomDataPerPoint.sh 896 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. ROOT=$(cd `dirname $0`/../../; pwd)
  3. cd $ROOT
  4. source $ROOT/shell/tsdb/common.sh
  5. #多点历史数据插入
  6. dataCountPerPointArray=(1000 2000 3000 5000 10000 20000 30000 50000 100000)
  7. pointCountArray=(2 3 5 10)
  8. index=1
  9. pointNamePrefix="pointName${index}_"
  10. for(( i=0;i<${#pointCountArray[@]};i++))
  11. do
  12. pointCount=${pointCountArray[i]}
  13. for(( j=0;j<${#dataCountPerPointArray[@]};j++))
  14. do
  15. dataCountPerPoint=${dataCountPerPointArray[j]}
  16. echo "----test insert pointCount:${pointCount} dataCountPerPoint:${dataCountPerPoint}"
  17. java -cp ./lib/tsdb.jar demo.allInsert.InsertHistoricalRandomData \
  18. --host=$host --pointNamePrefix=${pointNamePrefix} --pointCount=${pointCount} \
  19. --dataCountPerPoint=${dataCountPerPoint} --beginDate="2017-06-01 00:00:00" --period=7000 \
  20. --seed=1 --mean=10 --variance=1 --debug=0 2>&1 | tee -a ./log/tsdb/out.log
  21. done
  22. done