Package com.helix.profiler.node
Record Class NodeStats.Snapshot
java.lang.Object
java.lang.Record
com.helix.profiler.node.NodeStats.Snapshot
- Enclosing class:
NodeStats
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theavgCostNanosrecord component.doubleReturns the value of thecostToFailureRatiorecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexecutionCountrecord component.longReturns the value of thefailureCountrecord component.doubleReturns the value of thefailureRaterecord component.final inthashCode()Returns a hash code value for this object.nodeId()Returns the value of thenodeIdrecord component.ruleName()Returns the value of theruleNamerecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalDurationNanosrecord component.
-
Constructor Details
-
Snapshot
public Snapshot(String ruleName, String nodeId, long executionCount, long totalDurationNanos, long failureCount, double avgCostNanos, double failureRate, double costToFailureRatio) Creates an instance of aSnapshotrecord class.- Parameters:
ruleName- the value for theruleNamerecord componentnodeId- the value for thenodeIdrecord componentexecutionCount- the value for theexecutionCountrecord componenttotalDurationNanos- the value for thetotalDurationNanosrecord componentfailureCount- the value for thefailureCountrecord componentavgCostNanos- the value for theavgCostNanosrecord componentfailureRate- the value for thefailureRaterecord componentcostToFailureRatio- the value for thecostToFailureRatiorecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
ruleName
Returns the value of theruleNamerecord component.- Returns:
- the value of the
ruleNamerecord component
-
nodeId
Returns the value of thenodeIdrecord component.- Returns:
- the value of the
nodeIdrecord component
-
executionCount
public long executionCount()Returns the value of theexecutionCountrecord component.- Returns:
- the value of the
executionCountrecord component
-
totalDurationNanos
public long totalDurationNanos()Returns the value of thetotalDurationNanosrecord component.- Returns:
- the value of the
totalDurationNanosrecord component
-
failureCount
public long failureCount()Returns the value of thefailureCountrecord component.- Returns:
- the value of the
failureCountrecord component
-
avgCostNanos
public double avgCostNanos()Returns the value of theavgCostNanosrecord component.- Returns:
- the value of the
avgCostNanosrecord component
-
failureRate
public double failureRate()Returns the value of thefailureRaterecord component.- Returns:
- the value of the
failureRaterecord component
-
costToFailureRatio
public double costToFailureRatio()Returns the value of thecostToFailureRatiorecord component.- Returns:
- the value of the
costToFailureRatiorecord component
-