MCPcopy Create free account
hub / github.com/golang/groupcache / stats

Method stats

groupcache.go:408–418  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

406}
407
408func (c *cache) stats() CacheStats {
409 c.mu.RLock()
410 defer c.mu.RUnlock()
411 return CacheStats{
412 Bytes: c.nbytes,
413 Items: c.itemsLocked(),
414 Gets: c.nget,
415 Hits: c.nhit,
416 Evictions: c.nevict,
417 }
418}
419
420func (c *cache) add(key string, value ByteView) {
421 c.mu.Lock()

Callers 1

CacheStatsMethod · 0.80

Calls 1

itemsLockedMethod · 0.95

Tested by

no test coverage detected