Record Class CacheMetrics.MetricsSnapshot
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.CacheMetrics.MetricsSnapshot
- Record Components:
getCount- total get operations | 总获取操作数putCount- total put operations | 总放入操作数loadCount- total load operations | 总加载操作数evictionCount- total evictions | 总淘汰数getLatencyP50- P50 get latency (ns) | P50 获取延迟(纳秒)getLatencyP95- P95 get latency (ns) | P95 获取延迟(纳秒)getLatencyP99- P99 get latency (ns) | P99 获取延迟(纳秒)avgGetLatency- average get latency (ns) | 平均获取延迟(纳秒)minGetLatency- min get latency (ns) | 最小获取延迟(纳秒)maxGetLatency- max get latency (ns) | 最大获取延迟(纳秒)putLatencyP50- P50 put latency (ns) | P50 放入延迟(纳秒)putLatencyP95- P95 put latency (ns) | P95 放入延迟(纳秒)putLatencyP99- P99 put latency (ns) | P99 放入延迟(纳秒)avgPutLatency- average put latency (ns) | 平均放入延迟(纳秒)loadLatencyP50- P50 load latency (ns) | P50 加载延迟(纳秒)loadLatencyP95- P95 load latency (ns) | P95 加载延迟(纳秒)loadLatencyP99- P99 load latency (ns) | P99 加载延迟(纳秒)avgLoadLatency- average load latency (ns) | 平均加载延迟(纳秒)getThroughput- get ops/sec | 获取操作/秒putThroughput- put ops/sec | 放入操作/秒uptime- uptime duration | 运行时间
- Enclosing class:
CacheMetrics
public static record CacheMetrics.MetricsSnapshot(long getCount, long putCount, long loadCount, long evictionCount, long getLatencyP50, long getLatencyP95, long getLatencyP99, double avgGetLatency, long minGetLatency, long maxGetLatency, long putLatencyP50, long putLatencyP95, long putLatencyP99, double avgPutLatency, long loadLatencyP50, long loadLatencyP95, long loadLatencyP99, double avgLoadLatency, double getThroughput, double putThroughput, Duration uptime)
extends Record
Immutable metrics snapshot
不可变指标快照
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsSnapshot(long getCount, long putCount, long loadCount, long evictionCount, long getLatencyP50, long getLatencyP95, long getLatencyP99, double avgGetLatency, long minGetLatency, long maxGetLatency, long putLatencyP50, long putLatencyP95, long putLatencyP99, double avgPutLatency, long loadLatencyP50, long loadLatencyP95, long loadLatencyP99, double avgLoadLatency, double getThroughput, double putThroughput, Duration uptime) Creates an instance of aMetricsSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theavgGetLatencyrecord component.doubleReturns the value of theavgLoadLatencyrecord component.doubleReturns the value of theavgPutLatencyrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theevictionCountrecord component.format()Format as human-readable string 格式化为可读字符串longgetCount()Returns the value of thegetCountrecord component.longReturns the value of thegetLatencyP50record component.longReturns the value of thegetLatencyP95record component.longReturns the value of thegetLatencyP99record component.doubleReturns the value of thegetThroughputrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of theloadCountrecord component.longReturns the value of theloadLatencyP50record component.longReturns the value of theloadLatencyP95record component.longReturns the value of theloadLatencyP99record component.longReturns the value of themaxGetLatencyrecord component.longReturns the value of theminGetLatencyrecord component.longputCount()Returns the value of theputCountrecord component.longReturns the value of theputLatencyP50record component.longReturns the value of theputLatencyP95record component.longReturns the value of theputLatencyP99record component.doubleReturns the value of theputThroughputrecord component.final StringtoString()Returns a string representation of this record class.uptime()Returns the value of theuptimerecord component.
-
Constructor Details
-
MetricsSnapshot
public MetricsSnapshot(long getCount, long putCount, long loadCount, long evictionCount, long getLatencyP50, long getLatencyP95, long getLatencyP99, double avgGetLatency, long minGetLatency, long maxGetLatency, long putLatencyP50, long putLatencyP95, long putLatencyP99, double avgPutLatency, long loadLatencyP50, long loadLatencyP95, long loadLatencyP99, double avgLoadLatency, double getThroughput, double putThroughput, Duration uptime) Creates an instance of aMetricsSnapshotrecord class.- Parameters:
getCount- the value for thegetCountrecord componentputCount- the value for theputCountrecord componentloadCount- the value for theloadCountrecord componentevictionCount- the value for theevictionCountrecord componentgetLatencyP50- the value for thegetLatencyP50record componentgetLatencyP95- the value for thegetLatencyP95record componentgetLatencyP99- the value for thegetLatencyP99record componentavgGetLatency- the value for theavgGetLatencyrecord componentminGetLatency- the value for theminGetLatencyrecord componentmaxGetLatency- the value for themaxGetLatencyrecord componentputLatencyP50- the value for theputLatencyP50record componentputLatencyP95- the value for theputLatencyP95record componentputLatencyP99- the value for theputLatencyP99record componentavgPutLatency- the value for theavgPutLatencyrecord componentloadLatencyP50- the value for theloadLatencyP50record componentloadLatencyP95- the value for theloadLatencyP95record componentloadLatencyP99- the value for theloadLatencyP99record componentavgLoadLatency- the value for theavgLoadLatencyrecord componentgetThroughput- the value for thegetThroughputrecord componentputThroughput- the value for theputThroughputrecord componentuptime- the value for theuptimerecord component
-
-
Method Details
-
format
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
getCount
-
putCount
-
loadCount
-
evictionCount
public long evictionCount()Returns the value of theevictionCountrecord component.- Returns:
- the value of the
evictionCountrecord component
-
getLatencyP50
public long getLatencyP50()Returns the value of thegetLatencyP50record component.- Returns:
- the value of the
getLatencyP50record component
-
getLatencyP95
public long getLatencyP95()Returns the value of thegetLatencyP95record component.- Returns:
- the value of the
getLatencyP95record component
-
getLatencyP99
public long getLatencyP99()Returns the value of thegetLatencyP99record component.- Returns:
- the value of the
getLatencyP99record component
-
avgGetLatency
public double avgGetLatency()Returns the value of theavgGetLatencyrecord component.- Returns:
- the value of the
avgGetLatencyrecord component
-
minGetLatency
public long minGetLatency()Returns the value of theminGetLatencyrecord component.- Returns:
- the value of the
minGetLatencyrecord component
-
maxGetLatency
public long maxGetLatency()Returns the value of themaxGetLatencyrecord component.- Returns:
- the value of the
maxGetLatencyrecord component
-
putLatencyP50
public long putLatencyP50()Returns the value of theputLatencyP50record component.- Returns:
- the value of the
putLatencyP50record component
-
putLatencyP95
public long putLatencyP95()Returns the value of theputLatencyP95record component.- Returns:
- the value of the
putLatencyP95record component
-
putLatencyP99
public long putLatencyP99()Returns the value of theputLatencyP99record component.- Returns:
- the value of the
putLatencyP99record component
-
avgPutLatency
public double avgPutLatency()Returns the value of theavgPutLatencyrecord component.- Returns:
- the value of the
avgPutLatencyrecord component
-
loadLatencyP50
public long loadLatencyP50()Returns the value of theloadLatencyP50record component.- Returns:
- the value of the
loadLatencyP50record component
-
loadLatencyP95
public long loadLatencyP95()Returns the value of theloadLatencyP95record component.- Returns:
- the value of the
loadLatencyP95record component
-
loadLatencyP99
public long loadLatencyP99()Returns the value of theloadLatencyP99record component.- Returns:
- the value of the
loadLatencyP99record component
-
avgLoadLatency
public double avgLoadLatency()Returns the value of theavgLoadLatencyrecord component.- Returns:
- the value of the
avgLoadLatencyrecord component
-
getThroughput
public double getThroughput()Returns the value of thegetThroughputrecord component.- Returns:
- the value of the
getThroughputrecord component
-
putThroughput
public double putThroughput()Returns the value of theputThroughputrecord component.- Returns:
- the value of the
putThroughputrecord component
-
uptime
-