impactMarket enables access to inclusive financial solutions, including Unconditional Basic Income programs to support and empower vulnerable communities. Donate now and join our mission of promoting financial inclusion.
Load tests
This are the tests currently being used. Focused on memory usage.
To test you first need to run the API with yarn start:local
and then start the climem with yarn climem
.
Then use autocannon to do the requests. There is an example at yarn test:load
. See autocannon docs for more.
To learn more about both tools see this and this
Clinic.js offers 3 tools to help with performance analysis: Doctor, Bubbleprof, and Flame.
This tests are still under research.
npm install -g clinic
Diagnose performance issues in your Node.js applications. Run (should point to a js file):
clinic doctor -- node ./packages/api/dist/app.js
While running it's possible to do requests to the local endpoints and the Doctor will analyze them. After doing all the requests wanted. Press CTRL+C to shut down the API and start the Doctor report.
It is to possible automate the requests using autocannon
.
For that, run:
clinic doctor --autocannon [ /api/v2/communities ] -- node ./packages/api/dist/app.js
Creates bubble graphs.
clinic bubbleprof --autocannon [ /api/v2/communities ] -- node ./packages/api/dist/app.js
Creates flamegraphs.
clinic flame --autocannon [ /api/v2/communities ] -- node ./packages/api/dist/app.js