File: metrics.go

package info (click to toggle)
golang-github-renekroon-ttlcache 2.3.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 140 kB
  • sloc: makefile: 3
file content (15 lines) | stat: -rw-r--r-- 413 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package ttlcache

// Metrics contains common cache metrics so you can calculate hit and miss rates
type Metrics struct {
	// succesful inserts
	Inserted int64
	// retrieval attempts
	Retrievals int64
	// all get calls that were in the cache (excludes loader invocations)
	Hits int64
	// entries not in cache (includes loader invocations)
	Misses int64
	// items removed from the cache in any way
	Evicted int64
}