Statistics¶
By using CollectStats in the builder, you can turn on statistics collection. The Stats function in the cache returns a Stats struct which provides statistics such as
- Hitsreturns the number of cache hits.
- Missesreturns the number of cache misses.
- Ratioreturns the cache hit ratio.
The cache statistics can be integrated with a reporting system using a pull approach. A pull-based approach periodically calls Stats function and records the latest snapshot.