33 class PersistentStringCacheImpl;
34 class PersistentStringCacheStats;
67 std::string cache_path()
const;
77 int64_t size()
const noexcept;
82 int64_t size_in_bytes()
const noexcept;
87 int64_t max_size_in_bytes()
const noexcept;
92 int64_t hits()
const noexcept;
97 int64_t misses()
const noexcept;
102 int64_t hits_since_last_miss()
const noexcept;
107 int64_t misses_since_last_hit()
const noexcept;
112 int64_t longest_hit_run()
const noexcept;
117 int64_t longest_miss_run()
const noexcept;
122 int64_t hit_runs()
const noexcept;
127 int64_t miss_runs()
const noexcept;
132 double avg_hit_run_length()
const noexcept;
137 double avg_miss_run_length()
const noexcept;
142 int64_t ttl_evictions()
const noexcept;
148 int64_t lru_evictions()
const noexcept;
153 std::chrono::system_clock::time_point most_recent_hit_time()
const noexcept;
158 std::chrono::system_clock::time_point most_recent_miss_time()
const noexcept;
163 std::chrono::system_clock::time_point longest_hit_run_time()
const noexcept;
168 std::chrono::system_clock::time_point longest_miss_run_time()
const noexcept;
214 static constexpr
unsigned NUM_BINS = 74;
219 Histogram
const& histogram() const noexcept;
229 static HistogramBounds const& histogram_bounds() noexcept;
242 std::shared_ptr<internal::PersistentStringCacheStats const> p_;
246 friend class internal::PersistentStringCacheImpl;
std::vector< std::pair< int32_t, int32_t > > HistogramBounds
Lower and upper bounds for the bins in the histogram.
Definition: persistent_cache_stats.h:209
Top-level namespace for core functionality.
Definition: cache_events.h:28
std::vector< uint32_t > Histogram
Histogram of the size distribution of cache entries.
Definition: persistent_cache_stats.h:201
CacheDiscardPolicy
Indicates the discard policy to make room for entries when the cache is full.
Definition: cache_discard_policy.h:35
Class that provides (read-only) access to cache statistics and settings.
Definition: persistent_cache_stats.h:42