insertHistoricalRandomData.sh 1.0 KB

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