Execute the following steps to run a benchmark on Lightning:
-
Make sure you have k6 installed locally. If you're using
asdf
you can runasdf install
in the project root. -
Spin up your Lightning local instance
-
Run the demo setup script:
mix run --no-start priv/repo/demo.exs
ThewebhookURL
is already set to default to the webhook created in the demo data -
In another terminal (do not stop the Lightning server) run the
benchmarking/script.js
file using the following command
k6 run benchmarking/script.js
If the script exits succesfully, this means the app met the defined performance thresholds.
To collect the benchmarking data in a CSV file, run the previous command with
the --out filename
option.
k6 run --out csv=test_results.csv benchmarking/script.js
See results output for other available output formats.