Skip to content

rill-js/stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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!

About

πŸ“Š Simple browser performance monitoring.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published