insertHistoricalRandomDataPerPoint.sh 965 B

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