Closed hjacobs closed 1 year ago
My current approach looks like:
echo "GET http://localhost:8080/pets" | vegeta attack | vegeta dump -dumper csv | awk -F, '{ printf "%f %.2f %d\n", $1/(1000**3),$3/(1000**2),$2}' | feedgnuplot --stream --domain --lines --exit --y2 1 --title "Request Latencies" --timefmt "%s" --y2min 0 --y2max 600 --ylabel "Latency [ms]" --y2label "HTTP Status Code"
Cool! Can you make a screen capture and post it here? I'd love to see it in action.
My current command with "dumb" (ugly) terminal output:
echo "GET $url/pets" | vegeta attack -rate 8 | vegeta dump -dumper csv | awk -F, '{ printf "%f %.2f %d\nreplot\n", $1/(1000**3),$3/(1000**2),$2; fflush()}' | feedgnuplot --stream trigger --domain --lines --exit --y2 1 --title "Request Latencies" --timefmt "%s" --y2min 0 --y2max 600 --ylabel "Latency [ms]" --y2label "HTTP Status Code" --terminal "dumb 270 62" --monotonic 2>/dev/null
I mean't a GIF or similar.
@tsenart sure, I already had the video, but was busy on a conference (PyConWeb), so here finally the uploaded MP4 (could not make the conversation to GIF work): https://drive.google.com/open?id=1StqY0ZO66yyqejkNhCXqJsqZsJNUNcLx
Here the generated (scaled) GIF for the gnuplot X11 output (separate window, not directly in terminal). This looks much better but has the drawback of another window opening:
The command was:
echo "GET $url/pets" | vegeta attack -rate 8 | vegeta dump -dumper csv | awk -F, '{ printf "%f %.2f %d\nreplot\n", $1/(1000**3),$3/(1000**2),$2; fflush()}' | feedgnuplot --stream trigger --domain --lines --exit --y2 1 --title "Request Latencies" --timefmt "%s" --y2min 0 --y2max 600 --ylabel "Latency [ms]" --y2label "HTTP Status Code" --monotonic 2>/dev/null
Alright, PR welcome!
Did this go anywhere?
Hey @sandobits , I don't know if this is still relevant to you but since the deprecation of vegeta dump
in favor of vegeta encode
& the addition of the plot
subcommand, you can achieve a comparable result with only vegeta
command:
echo "GET $url/pets" | vegeta attack -rate 8 -name=8qps | > results.8qps.bin && cat results.8qps.bin | vegeta plot > plot.8qps.html && open plot.8qps.html
.
Leaving this here as it might be useful for oneliner lovers that happen to see this issue 🙂
Proposal
I would like to have real-time plotting (aka chart, graph, ..) for request latencies on a Linux terminal. The README already includes an example for iTerm (MacOS), but none for other OS. I propose adding instructions on how to have real-time analysis on Linux, e.g. by using
feedgnuplot
.Background
I'm currently testing my Connexion Example REST service with Kubernetes and want to test its behavior (including rolling updates and failures) under load.
Workarounds
I'm currently trying
vegeta dump -dumper=csv
andfeedgnuplot
. This seems to work. I would make a PR to include instructions on how to use it.