CacheStatistics

@Serializable
data class CacheStatistics(val hits: Long, val misses: Long, val evictions: Long, val size: Int, val hitRate: Double, val missRate: Double = 0.0, val utilizationRate: Double = 0.0, val currentSize: Int = size)(source)

Statistics tracked by a cache.

Constructors

Link copied to clipboard
constructor(hits: Long, misses: Long, evictions: Long, size: Int, hitRate: Double, missRate: Double = 0.0, utilizationRate: Double = 0.0, currentSize: Int = size)

Properties

Link copied to clipboard

Current number of entries in the cache.

Link copied to clipboard

Number of entries evicted.

Link copied to clipboard

Cache hit rate as a ratio from 0.0 to 1.0.

Link copied to clipboard
val hits: Long

Number of cache hits.

Link copied to clipboard

Number of cache misses.

Link copied to clipboard

Cache miss rate as a ratio from 0.0 to 1.0.

Link copied to clipboard
val size: Int

Total number of entries in the cache.

Link copied to clipboard

Cache utilization as a ratio from 0.0 to 1.0.