insertRealtimeRandomDataMultiClient.sh 818 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. #host=39.104.80.229
  3. host=127.0.0.1
  4. clientCount=2
  5. for(( i=0;i<${clientCount};i++))
  6. do
  7. pointNamePrefixArray[i]="prefix${i}_"
  8. done
  9. for pointCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000 200000 300000 500000 1000000 1200000 1500000 2000000
  10. #for pointCount in 1000000 1200000 1500000
  11. #for pointCount in 1500000
  12. do
  13. for ((i=0; i<${clientCount}; i++))
  14. do
  15. resultFile=${i}.log
  16. echo "----test concurrent insert clientIndex:${i} dataCountPerPoint:${pointCount}" | tee -a ${resultFile}
  17. java -cp ./lib/tsdb.jar demo.allInsert.InsertRealtimeRandomData \
  18. --host=$host --pointNamePrefix=${pointNamePrefixArray[i]} --pointCount=$pointCount --seed=1 \
  19. --mean=10 --variance=1 --debug=0 1>> ${resultFile} 2>> ${resultFile} &
  20. done
  21. echo sleep 13
  22. sleep 13 #10 second
  23. done