@rill/stats

1.0.0 • Public • Published

Rill
@rill/stats
API stability Standard NPM version Downloads Gitter Chat

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!

Package Sidebar

Install

npm i @rill/stats

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • dylanpiercey