This is a collection of scripts and tools to benchmark Madara leveraging artillery.
Steps to follow :
- Install the dependencies using
npm install && cd ../tests && npm install && npm run build && cd ../benchmarking
- Make sure you've built the project using
cd .. && cargo build --release
- Run the benchmark using
npm run test:ci
. If it does not work, just runcd .. && sh ./scripts/run_node.sh
and in another terminal runnpm run test:x
where x is the benchmark you want to run.
The following benchmarks are available :
npm run test:chain
: Simple stress test of the chainnpm run test:storage
: Deploys and execute cairo programs to benchmark the storage overheadnpm run test:execution
: Executes fib500 cairo programsnpm run test:transfer
: Executes ERC20 transfers
Or simply run npm run test
to run default benchmark and display metrics at the
end.
Thank you to https://github.com/dwellir-public/artillery-engine-substrate for the inspiration.