Closed ghost closed 6 years ago
Any PR is welcome. In my daily work, I did similar things with Jenkins and Docker, and it's doable.
I was thinking of using the Locust --no-web switch and awk to parse console output and netcat to send the metric to the statsd_exporter. Pretty low-fi , I know - but I should be able to graph metrics in Grafana.
Another option with the WebUI.
curl --data "locust_count=100&hatch_rate=10" "http://locust:8089/swarm"
for ((i=1; i<= 300; i++));
do
curl -s "http://localhost:8089/stats/requests" >> locust-stats.json;
echo "" >> locust-stats.json;
sleep 2;
done
curl -s "http://localhost:8089/stop"
You will get locust-stats.json, easier to parse.
Thanks for the suggestion but I am thinking the boomer rps flags and the locust user/ swarm rate could be confusing for the load tester, and I am leaning towards no interaction with the Locust UI. Although I could be heading in the wrong direction.
Yeah, Looks like a real hassle parsing stout or using tee. Getting broken connection and peer resets when using the Locust UI.
@myzhan Your technique works. Thanks.
I was thinking of writing some documentation on Prometheus, exporters and Grafana and submit a PR. WDYT? The idea I suppose is to bypass the Locust UI. I think the node and stats exporter could be exampled. As you mention the swarm rate is go routines and we have the max rate built in via your flag.