# newww-metrics

> a numbat metrics wrapper for newww

Latest version **1.0.0** (published 2014-09-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install newww-metrics
pnpm add newww-metrics
yarn add newww-metrics
bun add newww-metrics
```

## 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 | 2014-09-26 |
| First published | 2014-09-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Raquel Vélez |
| Maintainers | rockbot |
| Keywords | newww, metrics |

## Links

- npm: https://www.npmjs.com/package/newww-metrics
- Repository: git@github.com:npm/newww-metrics
- Homepage: https://github.com/npm/newww-metrics
- Issues: https://github.com/npm/newww-metrics/issues
- npm.io page: https://npm.io/package/newww-metrics

## Dependencies (1)

- [numbat-emitter](https://npm.io/package/numbat-emitter.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2014-09-26

## README

newww-metrics
=============

a [numbat metrics](https://www.npmjs.org/package/numbat-emitter) wrapper for newww

## Metrics we currently care about:

* When we hit certain pages
* How long it takes for a page to load
* How long it takes for data to come from CouchDB

## Installation

```shell
npm install newww-metrics
```

## Usage

```javascript
// In the server index

var  MetricsClient = require('newww-metrics');
var metrics = new MetricsClient(config.metrics);

```

```javascript
// On a given route

var metrics = require('newww-metrics')();

var timer = { start: Date.now() };

// ... stuff happens

timer.end = Date.now();
metrics.addPageLatencyMetric(timer, 'showPackage');

addMetric({ name: 'showPackage', package: request.params.package });

```

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