Package io.deephaven.base.stats
Class State
java.lang.Object
io.deephaven.base.stats.Value
io.deephaven.base.stats.State
- Direct Known Subclasses:
HistogramState
A statistic where each value represents a snapshot of the state of the system, and thus the sum of the values does
not have any meaning. Examples include queue size and latency. If the sum of the values does have a useful
interpretation, use
Counter
instead.
Value.sample(long)
takes a sample, recording a single value. This is the most common usage. (Value.increment(long)
does exactly the same thing but is a poor verb to use with a State.)sampleFromIncrement(long)
takes a sample, recording a value that is the last sample plus the given increment. (If no samples have yet been taken, the "last" sample is assumed to be 0). For example, this can be used to track a queue's size by calling it every time an item is added or removed.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
TYPE_TAG
public static final char TYPE_TAG- See Also:
-
FACTORY
-
-
Constructor Details
-
State
public State(long now)
-
-
Method Details
-
sampleFromIncrement
public void sampleFromIncrement(long n) -
getTypeTag
public char getTypeTag()- Specified by:
getTypeTag
in classValue
-