MetricCollectionConsoleMonitor
MetricCollectionConsoleMonitor
Kind: global class
- MetricCollectionConsoleMonitor
- new exports.MetricCollectionConsoleMonitor()
- .from(metrics, [timeout_seconds]) ⇒
PeriodicConsolePrinter
new exports.MetricCollectionConsoleMonitor()
Example
const metrics = new MetricCollection(); // get a metrics collection
// ...
MetricCollectionConsoleMonitor.from(metrics).start(); // from now on all metric stats will be printed in console every few seconds
MetricCollectionConsoleMonitor.from(metrics, [timeout_seconds]) ⇒ PeriodicConsolePrinter
Kind: static method of MetricCollectionConsoleMonitor
| Param | Type | Default | Description |
|---|---|---|---|
| metrics | MetricCollection | ||
| [timeout_seconds] | number | 3 | how frequently should stats be printed? In seconds. |