insertHistoricalRandomData.sh 994 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env bash
  2. #host=39.104.80.229
  3. host=127.0.0.1
  4. #dataCountPerPointArray=(1000 2000 3000 5000 10000 20000 30000 50000 100000)
  5. dataCountPerPointArray=(1000)
  6. #pointCountArray=(2 3 5 10)
  7. pointCountArray=(1)
  8. index=1
  9. beginDate="2021-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. #index=`expr $index + 1`
  17. echo "[${index}] test"
  18. dataCountPerPoint=${dataCountPerPointArray[j]}
  19. pointNamePrefix="pointName${index}_"
  20. echo "----test insert pointCount:${pointCount} dataCountPerPoint:${dataCountPerPoint}"
  21. java -cp ./lib/influxdb.jar demo.allInsert.InsertHistoricalRandomData \
  22. --host $host --pointNamePrefix ${pointNamePrefix} --pointCount ${pointCount} \
  23. --dataCountPerPoint ${dataCountPerPoint} --beginDate "$beginDate" --period 15000 \
  24. --seed 1 --mean 10 --variance 1 --debug 0 2>&1 | tee -a ./log/influxdb/out.log
  25. done
  26. done