2019-07-23 12:01:12 +08:00
|
|
|
package cache
|
|
|
|
|
|
|
|
import "github.com/bilibili/kratos/pkg/stat/metric"
|
|
|
|
|
|
|
|
const _metricNamespace = "cache"
|
|
|
|
|
2019-08-26 23:38:13 +08:00
|
|
|
// 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"},
|
|
|
|
})
|
|
|
|
)
|