2020-03-08 21:11:59 +00:00
|
|
|
package cache
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// epochSpansCacheSize defines the max number of epoch spans the cache can hold.
|
|
|
|
epochSpansCacheSize = 256
|
2020-03-10 19:41:55 +00:00
|
|
|
// Metrics for the span cache.
|
2020-03-08 21:11:59 +00:00
|
|
|
epochSpansCacheHit = promauto.NewCounter(prometheus.CounterOpts{
|
|
|
|
Name: "epoch_spans_cache_hit",
|
|
|
|
Help: "The total number of cache hits on the epoch spans cache.",
|
|
|
|
})
|
|
|
|
epochSpansCacheMiss = promauto.NewCounter(prometheus.CounterOpts{
|
|
|
|
Name: "epoch_spans_cache_miss",
|
|
|
|
Help: "The total number of cache misses on the epoch spans cache.",
|
|
|
|
})
|
|
|
|
)
|