Package com.yahoo.container.jdisc.state
Class MetricSnapshot
java.lang.Object
com.yahoo.container.jdisc.state.MetricSnapshot
- All Implemented Interfaces:
Iterable<Map.Entry<MetricDimensions,
MetricSet>>
public final class MetricSnapshot
extends Object
implements Iterable<Map.Entry<MetricDimensions,MetricSet>>
A snapshot of the metrics of this system in a particular time interval.
- Author:
- Simon Thoresen Hult
-
Constructor Summary
ConstructorDescriptionMetricSnapshot
(long from, long to, TimeUnit unit, Map<MetricDimensions, MetricSet> data) -
Method Summary
Modifier and TypeMethodDescriptionCreate a new snapshot instance where Gauge metrics are preserved with the last-values they have in this snapshot instance.long
getFromTime
(TimeUnit unit) long
iterator()
Returns all the metrics in this snapshot.Returns a metric set from this snapshot for a given set of dimensionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MetricSnapshot
-
-
Method Details
-
getFromTime
-
getToTime
-
iterator
Returns all the metrics in this snapshot.- Specified by:
iterator
in interfaceIterable<Map.Entry<MetricDimensions,
MetricSet>>
-
metricSet
Returns a metric set from this snapshot for a given set of dimensions -
createSnapshot
Create a new snapshot instance where Gauge metrics are preserved with the last-values they have in this snapshot instance.
-