1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-02-09 13:36:57 +02:00
kratos/pkg/cache/metrics.go

24 lines
557 B
Go
Raw Normal View History

2019-07-23 12:01:12 +08:00
package cache
2020-03-28 18:02:25 +08:00
import "github.com/go-kratos/kratos/pkg/stat/metric"
2019-07-23 12:01:12 +08:00
const _metricNamespace = "cache"
// be used in tool/kratos-gen-bts
2019-07-23 12:01:12 +08:00
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"},
})
)