Reference Guide

Table Of Contents
TimeStampedMetric is updated, relative to the controller's system clock, to indicate when the
update occurred; this time stamp is used by the framework in processing the resultant values.
The following methods may be used to update the value of each TimeStampedMetric type.
TimeStampedCounter
dec()Decrements the current count by one.
dec(long)Decrements the current count by the specified number.
inc()Increments the current count by one.
inc(long)Increments the current count by the specified number.
TimeStampedGauge
setValue(long)Stores the latest snapshot of the gauge value.
TimeStampedHistogram
update(int)Adds the specified value to the sample set stored by the histogram.
update(long)Adds the specified value to the sample set stored by the histogram.
TimeStampedMeter
mark()Marks the occurrence of one event.
mark(long)Marks the occurrence of the specified number of events.
TimeStampedRatioGauge
updateNumerator(double)Stores the latest snapshot of the numerator value.
updateDenominator(double)Stores the latest snapshot of the denominator value.
update(double, double)Stores the latest snapshot of both numerator and denominator
values.
TimeStampedRollingCounter
setLatestSnapshot(long)Stores the latest snapshot of the rolling counter.
TimeStampedTimer
time(Callable<T>)Measures the duration of execution for the provided Callable and
incorporates it into duration and throughput statistics.
update(int)Adds an externally-recorded duration in milliseconds.
update(long)Adds an externally-recorded duration in milliseconds.
Unregistering a TimeStampedMetric
Depending upon where its creation was initiated, from within or from outside the controller, the
collection of values from a TimeStampedMetric may be halted by a component or an application
that is running within the controller or from outside of the controller via the southbound metering
REST interface.
When the component or application that requested the creation of a TimeStampedMetric wishes to
stop the metering framework from processing a TimeStampedMetric, presumably in preparation for
destroying it, it must do so via the following MetricService method.
Metric Removal API:
51