Private
#innerAccumulates the provided samples in the metric.
Notes
Reports an ErrorType.InvalidOverflow
error for samples that are
longer than MAX_SAMPLE_TIME
.
A list of samples recorded by the metric. Samples must be in nanoseconds.
Accumulates the provided signed samples in the metric.
This will take care of filtering and reporting errors for any provided negative sample.
Please note that this assumes that the provided samples are already in
the "unit" declared by the instance of the metric type (e.g. if the instance
this method was called on is using TimeUnit.Second
, then samples
are
assumed to be in that unit).
Discards any negative value in samples
and reports an ErrorType.InvalidValue
for each of them. Reports an ErrorType.InvalidOverflow
error for samples that
are longer than MAX_SAMPLE_TIME
.
Holds all the samples for the recorded metric.
Starts tracking time for the provided metric. Multiple timers can run simultaneously.
This records an error if it's already tracking time (i.e.
start
was already called with no corresponding stopAndAccumulate
):
in that case the original start time will be preserved.
The ID to associate with this timing.
Stop tracking time for the provided metric and associated timer id. Add a
count to the corresponding bucket in the timing distribution.
This will record an error if no start
was called.
The timer id associated with this timing. This allows for concurrent timing of events associated with different ids to the same timespan metric.
Test-only API
Returns the number of errors recorded for the given metric.
The type of the error recorded.
Represents the name of the ping to retrieve the metric for.
Defaults to the first value in sendInPings
.
The number of errors recorded for the metric.
Test-only API
The ping from which we want to retrieve the metrics value from.
Defaults to the first value in sendInPings
.
The value found in storage or undefined
if nothing was found.
Generated using TypeDoc
A timing distribution metric.
Timing distributions are used to accumulate and store time measurement, for analyzing distributions of the timing data.