public interface TimedMetric
Metric for timed events like transaction execution times.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(long micros) Add a time event (usually in microseconds).void
addBatchSince
(long startNanos, int batch) Add a time event for a batch of beans.void
addSinceNanos
(long startNanos) Add a time event given the start nanos.collect
(boolean reset) Collect and return a snapshot of the metrics.boolean
isEmpty()
Return true if there are no metrics collected since the last collection.void
reset()
Reset the statistics.void
visit
(MetricVisitor visitor) Visit non empty metrics.
-
Method Details
-
add
void add(long micros) Add a time event (usually in microseconds). -
addBatchSince
void addBatchSince(long startNanos, int batch) Add a time event for a batch of beans. -
addSinceNanos
void addSinceNanos(long startNanos) Add a time event given the start nanos. -
isEmpty
boolean isEmpty()Return true if there are no metrics collected since the last collection. -
reset
void reset()Reset the statistics. -
collect
Collect and return a snapshot of the metrics. -
visit
Visit non empty metrics.
-