# @rill/stats

> Simple browser performance monitoring.

Latest version **1.0.0** (published 2016-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rill/stats
pnpm add @rill/stats
yarn add @rill/stats
bun add @rill/stats
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-09-02 |
| First published | 2016-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dylan Piercey |
| Maintainers | dylanpiercey, rill |
| Keywords | isomorphic, monitor, performance, rill, stats, stats.js, universal |

## Links

- npm: https://www.npmjs.com/package/@rill/stats
- Repository: https://github.com/rill-js/stats
- Issues: https://github.com/rill-js/stats/issues
- npm.io page: https://npm.io/package/@rill/stats

## Dependencies (1)

- [stats.js](https://npm.io/package/stats.js.md) ^0.16.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-09-02
- 0.1.1 — 2016-01-09
- 0.1.0 — 2016-01-09

## README

<h1 align="center">
  <!-- Logo -->
  <img src="https://raw.githubusercontent.com/rill-js/rill/master/Rill-Icon.jpg" alt="Rill"/>
  <br/>
  @rill/stats
	<br/>

  <!-- Stability -->
  <a href="https://nodejs.org/api/documentation.html#documentation_stability_index">
    <img src="https://img.shields.io/badge/stability-stable-brightgreen.svg?style=flat-square" alt="API stability"/>
  </a>
  <!-- Standard -->
  <a href="https://github.com/feross/standard">
    <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square" alt="Standard"/>
  </a>
  <!-- NPM version -->
  <a href="https://npmjs.org/package/@rill/stats">
    <img src="https://img.shields.io/npm/v/@rill/stats.svg?style=flat-square" alt="NPM version"/>
  </a>
  <!-- Downloads -->
  <a href="https://npmjs.org/package/@rill/stats">
    <img src="https://img.shields.io/npm/dm/@rill/stats.svg?style=flat-square" alt="Downloads"/>
  </a>
  <!-- Gitter Chat -->
  <a href="https://gitter.im/rill-js/rill">
    <img src="https://img.shields.io/gitter/room/rill-js/rill.svg?style=flat-square" alt="Gitter Chat"/>
  </a>
</h1>

Adds a simple browser performance monitoring to a Rill app.
The performance monitoring is powered by [stats.js](https://github.com/mrdoob/stats.js).

# Installation

```console
npm install @rill/stats
```

# Example

```javascript
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).

```js
{
	"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!

---
_Source: https://npm.io/package/@rill/stats · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
