You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
kratos/pkg/cache/metrics.go

23 lines
557 B

package cache
import "github.com/go-kratos/kratos/pkg/stat/metric"
const _metricNamespace = "cache"
// be used in tool/kratos-gen-bts
var (
MetricHits = metric.NewCounterVec(&metric.CounterVecOpts{
Namespace: _metricNamespace,
Subsystem: "",
Name: "hits_total",
Help: "cache hits total.",
Labels: []string{"name"},
})
MetricMisses = metric.NewCounterVec(&metric.CounterVecOpts{
Namespace: _metricNamespace,
Subsystem: "",
Name: "misses_total",
Help: "cache misses total.",
Labels: []string{"name"},
})
)