I want to load test Influx, how do I replay the recent queries that were executed? I have not found anything meaningful on Google.
Asked
Active
Viewed 24 times
1 Answers
0
You can get queries with:
docker logs $MYCONTAINER --since "10m" |& grep -o -P "query=\K.+" | sed 's/^.//;s/.$//' > out.txt
And then execute them with:
cat out.txt | xargs -I _ docker run -t --rm influxdb:1.8-alpine influx -host MYHOST -port 8086 -username USER -password PASS -database DB -execute _
To measure the time spent for each query, on the influx box you can run
sudo strace -p $(pgrep influxd) -f -e write -t -s 512 |& grep "write(1,"
Explanation:
strace listens for syscalls.
-fflag finds and hooks into any child processes.-elistens to specific syscalls-tshows timestamps-ssets the numbers characters to display
With grep, we want to avoid the network syscalls, so we only look at the stdout file descriptor.
Bob
- 130