Livebook for simple performance/load testing

I’ve just open sourced my Livebook for performing simple performance/load testing - it’s configured for testing APIs by default, but is really easy to change to benchmark any Elixir function, including shelling out with System.cmd/3. So it should work for anything! GitHub - mcintyre94/livebook-performance-testing: An Elixir LiveBook for simple API performance/load testing

You can import it into Livebook by URL: https://github.com/mcintyre94/livebook-performance-testing/blob/main/performance-testing.livemd

It features:

  • Livebook inputs for the URL to test and number of iterations to perform

  • Draw a graph showing response times live as requests are made

Video of the graph being populated: https://twitter.com/thecallummc/status/1409095529309605893?s=20

  • Render simple summary stats (min response time, max response time, median response time, standard deviation) neatly as Markdown.


I recently saw José’s awesome demo of some Livebook v0.2 features and one of the features that really stood out to me was using VegaLite + Kino in Livebook to render graphs that update as new data is pushed to them. I figured I’d see if I could use it to replace a hacky workflow I have for performance testing - which is basically curl in a for loop + gnuplot + st all glued together inelegantly with bash.

I think it turned out pretty nicely! :smiley:

9 Likes