insertHistoricalRandomDataMultiPoint.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. #多点历史数据插入
  7. dataCountPerPointArray=(1000 2000 3000 5000 10000 20000 30000 50000 100000)
  8. pointCountArray=(2 3 5 10)
  9. #单点历史数据插入
  10. # dataCountPerPointArray=(1)
  11. # pointCountArray=(1000 2000 3000 5000 10000 20000 30000 50000 100000 200000 300000 500000 1000000)
  12. #某时刻插入N点数据
  13. #dataCountPerPointArray=(1)
  14. #pointCountArray=(500000)
  15. index=0
  16. for(( i=0;i<${#pointCountArray[@]};i++))
  17. do
  18. pointCount=${pointCountArray[i]}
  19. for(( j=0;j<${#dataCountPerPointArray[@]};j++))
  20. do
  21. index=`expr $index + 1`
  22. echo "[${index}] test"
  23. dataCountPerPoint=${dataCountPerPointArray[j]}
  24. pointNamePrefix="pointName${index}_"
  25. echo "----test insert pointCount:${pointCount} dataCountPerPoint:${dataCountPerPoint}"
  26. java -cp ./lib/tsdb.jar demo.allInsert.InsertHistoricalRandomData \
  27. --host=$host --pointNamePrefix=${pointNamePrefix} --pointCount=${pointCount} \
  28. --dataCountPerPoint=${dataCountPerPoint} --beginDate="2021-03-01 00:00:00" --period=7000 \
  29. --seed=1 --mean=10 --variance=1 --debug=0 2>&1 | tee -a ./log/tsdb/out.log
  30. done
  31. done