dtrace-express

3.0.0 • Public • Published

dtrace-express

A library that implements dynamic tracing for express.

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

js-semistandard-style CircleCI

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.

Readme

Keywords

Package Sidebar

Install

npm i dtrace-express

Weekly Downloads

4

Version

3.0.0

License

MIT

Unpacked Size

12.5 kB

Total Files

16

Last publish

Collaborators

  • no9