INNER CODE UNIT · Go

func

go-graphite/go-carbon · cache/cache.go:157

func (*Cache) Stop() {}

// Collect cache metrics
func (c *Cache) Stat(send helper.StatCallback) {
	s := c.settings.Load().(*cacheSettings)

	send("size", float64(c.Size()))
	send("metrics", float64(c.Len()))
	send("maxSize", float64(s.maxSize))
	send("notConfirmed", float64(c.NotConfirmedLength()))
	// report elements in bloom filter
	if c.newMetricCf != nil {
		cfCount := c.newMetricCf.Cardinality()
		if uint64(cfCount) > c.newMetricCfCapacity {
			// full filter report +Inf cardinality
			cfCount = float64(c.newMetricCfCapacity)
		}
		send("cfCount", cfCount)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…