MCPcopy Create free account
hub / github.com/AdRoll/baker / Metrics

Method Metrics

pkg/buffercache/cache.go:359–367  ·  view source on GitHub ↗

Metrics returns a snapshot of the cache performance counters. This is not safe for concurrent use by multiple goroutines.

()

Source from the content-addressed store, hash-verified

357//
358// This is not safe for concurrent use by multiple goroutines.
359func (c *BufferCache) Metrics() Metrics {
360 m := Metrics{}
361
362 m.Hot.TotalEntries = uint64(len(c.hot.m))
363 m.Hot.TotalSize = uint64(c.hot.cap)
364 m.Cold = *c.cold.metrics()
365 m.TotalFlushes = c.nflushes
366 return m
367}

Callers 1

TestHotCacheMetricsFunction · 0.80

Calls 1

metricsMethod · 0.80

Tested by 1

TestHotCacheMetricsFunction · 0.64