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