Timer initialization method
const gauge = new Gauge('timing_is_everything');
const endTimer = gauge.startTimer();
setTimeout(endTimer, 2000);
// or
setTimeout(() => { endTimer(/* list of tags *\/); }, 2000)
Optional tags to be sent with the metric
A function that needs to be called when the timer should end. The end method has a Tags argument as well, giving you the possibility to add additional tags at end of timer call.
Generated using TypeDoc
Timer Trait Class
This class is not used as standalone and it cannot be instantiated by itself. Its prototype is copied to classes like Gauge, Histogram or Summary to fulfill the timing functionality.