Package com.helix.profiler.metrics
Record Class MetricsSnapshot
java.lang.Object
java.lang.Record
com.helix.profiler.metrics.MetricsSnapshot
public record MetricsSnapshot(long rulesCompiled, long rulesExecuted, long cacheHits, long cacheMisses, long activeClassLoaders, long metaspaceUsedBytes, double p50DurationNanos, double p95DurationNanos, double p99DurationNanos, Instant timestamp)
extends Record
Immutable snapshot of engine performance metrics at a specific point in time.
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsSnapshot(long rulesCompiled, long rulesExecuted, long cacheHits, long cacheMisses, long activeClassLoaders, long metaspaceUsedBytes, double p50DurationNanos, double p95DurationNanos, double p99DurationNanos, Instant timestamp) Creates an instance of aMetricsSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theactiveClassLoadersrecord component.longReturns the value of thecacheHitsrecord component.longReturns the value of thecacheMissesrecord component.final booleanIndicates whether some other object is "equal to" this one.doublefinal inthashCode()Returns a hash code value for this object.longReturns the value of themetaspaceUsedBytesrecord component.doubleReturns the value of thep50DurationNanosrecord component.doubleReturns the value of thep95DurationNanosrecord component.doubleReturns the value of thep99DurationNanosrecord component.longReturns the value of therulesCompiledrecord component.longReturns the value of therulesExecutedrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MetricsSnapshot
public MetricsSnapshot(long rulesCompiled, long rulesExecuted, long cacheHits, long cacheMisses, long activeClassLoaders, long metaspaceUsedBytes, double p50DurationNanos, double p95DurationNanos, double p99DurationNanos, Instant timestamp) Creates an instance of aMetricsSnapshotrecord class.- Parameters:
rulesCompiled- the value for therulesCompiledrecord componentrulesExecuted- the value for therulesExecutedrecord componentcacheHits- the value for thecacheHitsrecord componentcacheMisses- the value for thecacheMissesrecord componentactiveClassLoaders- the value for theactiveClassLoadersrecord componentmetaspaceUsedBytes- the value for themetaspaceUsedBytesrecord componentp50DurationNanos- the value for thep50DurationNanosrecord componentp95DurationNanos- the value for thep95DurationNanosrecord componentp99DurationNanos- the value for thep99DurationNanosrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
getCacheHitRate
public double getCacheHitRate() -
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 '=='. -
rulesCompiled
public long rulesCompiled()Returns the value of therulesCompiledrecord component.- Returns:
- the value of the
rulesCompiledrecord component
-
rulesExecuted
public long rulesExecuted()Returns the value of therulesExecutedrecord component.- Returns:
- the value of the
rulesExecutedrecord component
-
cacheHits
public long cacheHits()Returns the value of thecacheHitsrecord component.- Returns:
- the value of the
cacheHitsrecord component
-
cacheMisses
public long cacheMisses()Returns the value of thecacheMissesrecord component.- Returns:
- the value of the
cacheMissesrecord component
-
activeClassLoaders
public long activeClassLoaders()Returns the value of theactiveClassLoadersrecord component.- Returns:
- the value of the
activeClassLoadersrecord component
-
metaspaceUsedBytes
public long metaspaceUsedBytes()Returns the value of themetaspaceUsedBytesrecord component.- Returns:
- the value of the
metaspaceUsedBytesrecord component
-
p50DurationNanos
public double p50DurationNanos()Returns the value of thep50DurationNanosrecord component.- Returns:
- the value of the
p50DurationNanosrecord component
-
p95DurationNanos
public double p95DurationNanos()Returns the value of thep95DurationNanosrecord component.- Returns:
- the value of the
p95DurationNanosrecord component
-
p99DurationNanos
public double p99DurationNanos()Returns the value of thep99DurationNanosrecord component.- Returns:
- the value of the
p99DurationNanosrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-