JSPM

dtrace-express

3.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q34006F
  • License MIT

A dtrace library that implements express tracing

Package Exports

  • dtrace-express

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dtrace-express) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.