Class: NoOpMeter

NoOpMeter

A No-Op Impl of Meter that can be used with a timer, to only create histogram data.
This is useful for some time series aggregators that can calculate rates for you just off of sent count.


new NoOpMeter()

Implements:
Source:
Example
const { NoOpMeter, Timer } = require('measured')
const meter = new NoOpMeter();
const timer = new Timer({meter: meter});
...
// do some stuff with the timer and stopwatch api
...

Methods


currentRate()

No-Op impl

Source:

end()

No-Op impl

Source:

getType()

The type of the Metric Impl. MetricTypes.

Implements:
Source:
Returns:

The type of the Metric Impl.

Type
string

mark(n)

No-Op impl

Parameters:
Name Type Description
n number

Number of events to mark.

Source:

meanRate()

No-Op impl

Source:

ref()

No-Op impl

Source:

reset()

No-Op impl

Source:

start()

No-Op impl

Source:

toJSON()

Returns an empty object

Implements:
Source:
Returns:
Type
Object

unref()

No-Op impl

Source: