@rill/stats
v1.0.0
Published
Simple browser performance monitoring.
Downloads
7
Maintainers
Readme
Adds a simple browser performance monitoring to a Rill app. The performance monitoring is powered by stats.js.
Installation
npm install @rill/stats
Example
var app = require('rill')()
var stats = require('@rill/stats')
// Every request will be measured with stats.js.
app.use(stats({ mode: "ms" }))
Default modes
(Click on the frame to switch between modes).
{
"ms" // monitor (avg) ms during requests.
"mb" // monitor current MBytes of allocated memory.
"fps"// monitor (avg) fps during requests (typically useless).
}
Production Use
@rill/stats exposes a noop function when "process.env.NODE_ENV" is true. This allows for build tools such as babel, browserify or webpack to remove this functionality for production sites.
Contributions
- Use
npm test
to run tests.
Please feel free to create a PR!