Skip to content

Instantly share code, notes, and snippets.

@umiyosh
Last active December 23, 2023 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umiyosh/2b35aec355bcdad0e1bad9d362fa2383 to your computer and use it in GitHub Desktop.
Save umiyosh/2b35aec355bcdad0e1bad9d362fa2383 to your computer and use it in GitHub Desktop.
Vegeta with realtime client monitoring

Vegeta with realtime client monitoring

Pre requisite

brew install vegeta
go install github.com/rs/jaggr@latest
go install github.com/rs/jplot@latest

How to execute

You can run the bellow commands on a sixel-supported terminal to perform load attacks while monitoring client metrics in real-time.

echo 'GET http://localhost:8080/' | \
    vegeta attack -rate 10 -duration 10m | vegeta encode | \
    jaggr @count=rps \
          hist\[100,200,300,400,500\]:code \
          p25,p50,p95:latency \
          sum:bytes_in \
          sum:bytes_out | \
    jplot rps+code.hist.100+code.hist.200+code.hist.300+code.hist.400+code.hist.500 \
          latency.p95+latency.p50+latency.p25 \
          bytes_in.sum+bytes_out.sum

Result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment