github.com/prysmaticlabs/prysm@v1.4.4/slasher/cache/span_cache.go (about)

     1  package cache
     2  
     3  import (
     4  	"github.com/prometheus/client_golang/prometheus"
     5  	"github.com/prometheus/client_golang/prometheus/promauto"
     6  )
     7  
     8  var (
     9  	// epochSpansCacheSize defines the max number of epoch spans the cache can hold.
    10  	epochSpansCacheSize = 256
    11  	// Metrics for the span cache.
    12  	epochSpansCacheHit = promauto.NewCounter(prometheus.CounterOpts{
    13  		Name: "epoch_spans_cache_hit",
    14  		Help: "The total number of cache hits on the epoch spans cache.",
    15  	})
    16  	epochSpansCacheMiss = promauto.NewCounter(prometheus.CounterOpts{
    17  		Name: "epoch_spans_cache_miss",
    18  		Help: "The total number of cache misses on the epoch spans cache.",
    19  	})
    20  )