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 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 a MetricsSnapshot record class.
      Parameters:
      getCount - the value for the getCount record component
      putCount - the value for the putCount record component
      loadCount - the value for the loadCount record component
      evictionCount - the value for the evictionCount record component
      getLatencyP50 - the value for the getLatencyP50 record component
      getLatencyP95 - the value for the getLatencyP95 record component
      getLatencyP99 - the value for the getLatencyP99 record component
      avgGetLatency - the value for the avgGetLatency record component
      minGetLatency - the value for the minGetLatency record component
      maxGetLatency - the value for the maxGetLatency record component
      putLatencyP50 - the value for the putLatencyP50 record component
      putLatencyP95 - the value for the putLatencyP95 record component
      putLatencyP99 - the value for the putLatencyP99 record component
      avgPutLatency - the value for the avgPutLatency record component
      loadLatencyP50 - the value for the loadLatencyP50 record component
      loadLatencyP95 - the value for the loadLatencyP95 record component
      loadLatencyP99 - the value for the loadLatencyP99 record component
      avgLoadLatency - the value for the avgLoadLatency record component
      getThroughput - the value for the getThroughput record component
      putThroughput - the value for the putThroughput record component
      uptime - the value for the uptime record component
  • Method Details

    • format

      public String format()
      Format as human-readable string 格式化为可读字符串
      Returns:
      formatted string | 格式化字符串
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • getCount

      public long getCount()
      Returns the value of the getCount record component.
      Returns:
      the value of the getCount record component
    • putCount

      public long putCount()
      Returns the value of the putCount record component.
      Returns:
      the value of the putCount record component
    • loadCount

      public long loadCount()
      Returns the value of the loadCount record component.
      Returns:
      the value of the loadCount record component
    • evictionCount

      public long evictionCount()
      Returns the value of the evictionCount record component.
      Returns:
      the value of the evictionCount record component
    • getLatencyP50

      public long getLatencyP50()
      Returns the value of the getLatencyP50 record component.
      Returns:
      the value of the getLatencyP50 record component
    • getLatencyP95

      public long getLatencyP95()
      Returns the value of the getLatencyP95 record component.
      Returns:
      the value of the getLatencyP95 record component
    • getLatencyP99

      public long getLatencyP99()
      Returns the value of the getLatencyP99 record component.
      Returns:
      the value of the getLatencyP99 record component
    • avgGetLatency

      public double avgGetLatency()
      Returns the value of the avgGetLatency record component.
      Returns:
      the value of the avgGetLatency record component
    • minGetLatency

      public long minGetLatency()
      Returns the value of the minGetLatency record component.
      Returns:
      the value of the minGetLatency record component
    • maxGetLatency

      public long maxGetLatency()
      Returns the value of the maxGetLatency record component.
      Returns:
      the value of the maxGetLatency record component
    • putLatencyP50

      public long putLatencyP50()
      Returns the value of the putLatencyP50 record component.
      Returns:
      the value of the putLatencyP50 record component
    • putLatencyP95

      public long putLatencyP95()
      Returns the value of the putLatencyP95 record component.
      Returns:
      the value of the putLatencyP95 record component
    • putLatencyP99

      public long putLatencyP99()
      Returns the value of the putLatencyP99 record component.
      Returns:
      the value of the putLatencyP99 record component
    • avgPutLatency

      public double avgPutLatency()
      Returns the value of the avgPutLatency record component.
      Returns:
      the value of the avgPutLatency record component
    • loadLatencyP50

      public long loadLatencyP50()
      Returns the value of the loadLatencyP50 record component.
      Returns:
      the value of the loadLatencyP50 record component
    • loadLatencyP95

      public long loadLatencyP95()
      Returns the value of the loadLatencyP95 record component.
      Returns:
      the value of the loadLatencyP95 record component
    • loadLatencyP99

      public long loadLatencyP99()
      Returns the value of the loadLatencyP99 record component.
      Returns:
      the value of the loadLatencyP99 record component
    • avgLoadLatency

      public double avgLoadLatency()
      Returns the value of the avgLoadLatency record component.
      Returns:
      the value of the avgLoadLatency record component
    • getThroughput

      public double getThroughput()
      Returns the value of the getThroughput record component.
      Returns:
      the value of the getThroughput record component
    • putThroughput

      public double putThroughput()
      Returns the value of the putThroughput record component.
      Returns:
      the value of the putThroughput record component
    • uptime

      public Duration uptime()
      Returns the value of the uptime record component.
      Returns:
      the value of the uptime record component