insertHistoricalRandomData.sh 1.1 KB

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