struct

Fetcher::CacheStats

Inherits Struct < Value < Object

Constructors

new(hits : Atomic(UInt64) = Atomic.new(0_u64), misses : Atomic(UInt64) = Atomic.new(0_u64), evictions : Atomic(UInt64) = Atomic.new(0_u64))
Source
snapshot(hits : UInt64, misses : UInt64, evictions : UInt64) : CacheStats
Source

Instance methods

evictions
Source
hit_ratio
Source
hits
Source
misses
Source
record_eviction
Source
record_hit
Source
record_miss
Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source