Skip to content

No9/dtrace-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dtrace-express

A library that implements dynamic tracing for express.

It also includes platform specific scripts to output traces for visualization.

js-semistandard-style

prereqs

linux

fedora

$ sudo dnf install elfutils-libelf-devel

ubuntu

sudo apt install libelf1 libelf-dev

all

$ git clone https://github.com/sthima/libstapsdt.git
$ cd libstapsdt
$ make
$ sudo make install

freebsd 12-0

curl http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.0-RELEASE/src.txz > src.txz 
tar -C / -xvf src.txz

install

% npm install express -S
% npm install https://github.com/No9/express-tracer.git -S 
% npm install dtrace-express -S

usage

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.js

In a seperate console as root run

# bpftrace -p $(pgrep node) examples/events/event.bt

In another seperate console Genrate some load with artillery

% npm install artillery -g
% artillery quick --duration 60 --rate 10 -n 20 http://localhost:3000/event

Now stop the dtrace sample and do some post processing.

About

A library that implements dtrace for express

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published