Skip to content

Commit

Permalink
Add basic reporter example.
Browse files Browse the repository at this point in the history
  • Loading branch information
tolbertam committed Mar 15, 2016
1 parent bde4731 commit d120d1e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ metricsServer.addMetric('com.co.thingD', meter);
metricsServer.addMetric('com.co.thingE', timer);
```

**Setting up a Reporter**

A reporting interface exists for reporting metrics on a recurring interval. Reporters can be found in [reporting/](reporting).

```javascript
// Report to console every 1000ms.
var report = new metrics.Report();
report.addMetric('com.co.thingA', counter);
var reporter = new metrics.ConsoleReporter(report);

reporter.start(1000);
```

Advanced Usage
--------------
Expand Down

0 comments on commit d120d1e

Please sign in to comment.