Skip to main content

MetricCollectionConsoleMonitor

MetricCollectionConsoleMonitor

Kind: global class

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

ParamTypeDefaultDescription
metricsMetricCollection
[timeout_seconds]number3how frequently should stats be printed? In seconds.