Record Class Percentiles
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.storage.strategy.Percentiles
The three points of a distribution worth showing an operator: typical, tail, and worst.
- Since:
- 2027.02
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPercentiles(long p50, long p95, long max) Creates an instance of aPercentilesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longmax()Returns the value of themaxrecord component.static Percentilesof(com.codahale.metrics.Snapshot snapshot) Rounds a reservoir snapshot half up to p50, p95 and max.longp50()Returns the value of thep50record component.longp95()Returns the value of thep95record component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
No samples yet.
-
-
Constructor Details
-
Percentiles
public Percentiles(long p50, long p95, long max) Creates an instance of aPercentilesrecord class.- Parameters:
p50- the value for thep50record componentp95- the value for thep95record componentmax- the value for themaxrecord component
-
-
Method Details
-
of
Rounds a reservoir snapshot half up to p50, p95 and max.- Parameters:
snapshot- the reservoir snapshot.- Returns:
- the three points;
EMPTYwhen the snapshot holds no samples.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
p50
public long p50()Returns the value of thep50record component.- Returns:
- the value of the
p50record component
-
p95
public long p95()Returns the value of thep95record component.- Returns:
- the value of the
p95record component
-
max
public long max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-