3.0.0 • Published 6 years ago
dtrace-express v3.0.0
dtrace-express
A library that implements dynamic tracing for express.
It also includes platform specific scripts to output traces for visualization.
prereqs
linux
fedora
$ sudo dnf install elfutils-libelf-develubuntu
sudo apt install libelf1 libelf-devall
$ git clone https://github.com/sthima/libstapsdt.git
$ cd libstapsdt
$ make
$ sudo make installfreebsd 12-0
curl http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.0-RELEASE/src.txz > src.txz
tar -C / -xvf src.txzinstall
% npm install express -S
% npm install https://github.com/No9/express-tracer.git -S
% npm install dtrace-express -Susage
There are two ways to instrument your express application. The first is to raise single events and allow them to be interpreted by the analysis tool. The second is to perform latency analysis at runtime.
event example
% node examples/events/server.jsIn a seperate console as root run
# bpftrace -p $(pgrep node) examples/events/event.btIn another seperate console Genrate some load with artillery
% npm install artillery -g
% artillery quick --duration 60 --rate 10 -n 20 http://localhost:3000/eventNow stop the dtrace sample and do some post processing.