Skip to content

mcintyre94/livebook-performance-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Run in Livebook

Performance testing with Livebook

This repo contains a Livebook written in Elixir that can be used to perform simple API performance/load testing.

  • It uses Livebook inputs to set a URL to query + a number of iterations
  • It can be easily modified to perform any Elixir funtion, including shelling out with System.cmd/3 to test any shell function
  • It uses VegaLite and Kino to render a graph of response times live as requests are made
  • It generates a summary of statistics from the response times and renders it as Markdown

Usage

The easiest way to run this livebook is using livebook.dev:

Run in Livebook

Note that currently the Fly free tier instance doesn't have enough memory to run this livebook.

Scroll down to "HTTP request performance testing" which is where we configure the performance testing.

Update the URL and Iterations inputs as required.

If required, update the request_function definition. Currently this performs a GET request to the input URL. This can be any Elixir function, as long as it returns :ok

Run the notebook! You can use the keyboard shortcut ea to execute all cells.

Running without livebook.dev

You'll need to install and run Livebook if you don't already have it installed. Follow the instructions in the repo: https://github.com/elixir-nx/livebook#usage

The notebook can be imported by URL: https://github.com/mcintyre94/livebook-performance-testing/blob/main/performance-testing.livemd

About

An Elixir LiveBook for simple API performance/load testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published