Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 791 Bytes

PERFORMANCE.md

File metadata and controls

33 lines (23 loc) · 791 Bytes

Performance

There is a Vagrantfile with performance inspection tools like SystemTap.

vagrant up
vagrant ssh

APIcast is mounted into /home/vagrant/app so you can start it by:

cd app
bin/apicast

For profiling with stapxx it is recommended to start just one process and worker:

bin/apicast -m off -w 1 -c examples/configuration/echo.json  > /dev/null

Then by opening another terminal you can use vegeta to create traffic:

echo 'GET http://localhost:8080/?user_key=foo' | vegeta attack -rate=200 -duration=5m | vegeta report

And in another terminal you can create flamegraphs:

lj-lua-stacks.sxx  -x `pgrep openresty` --skip-badvars --arg time=30 | fix-lua-bt - | stackcollapse-stap.pl | flamegraph.pl > app/graph.svg