node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey ยป



bricks-analytics adds basic route analytics and status information about the health of the http server.


npm install bricks-analytics


var analytics = require('bricks-analytics');

appServer.addRoute(".+", analytics, { section: "pre", top: true, keep: 100 /* default 10 */ });

Analytics are then available via two JSON requests:

$ curl
$ curl

or via an html page:


bricks-analytics hooks into the call stack during and after execution. Given that bricks uses a stack-based routing system, adjustments to start times happen upon request. Also, given that a route can finish before the call stack is fully unwound, actual execution time could be less than the sum of each route.