Documentation ¶
Index ¶
- Constants
- func MeasureLatency(observer prometheus.Observer, startTime time.Time)
- func MergeMapFloat64(m1, m2 map[string]float64) map[string]float64
- func MergeMapPercentile(m1, m2 map[string]*Percentile, count float64) map[string]*Percentile
- func MergeMapUint64(m1, m2 map[string]uint64) map[string]uint64
- func NewPromethousNoopRegistry() prometheus.Registerer
- func NewPromethousRegistry() prometheus.Registerer
- type Client
- type DKVMetrics
- type Percentile
- type StatStreamer
- type Tag
Constants ¶
View Source
const ( Namespace = "dkv" Ops = "ops" Put = "put" MultiPut = "mput" Get = "get" MultiGet = "mget" Delete = "del" GetSnapShot = "getSnapShot" PutSnapShot = "putSnapShot" Iterate = "iter" CompareAndSet = "cas" LoadChange = "loadChange" SaveChange = "saveChange" )
Variables ¶
This section is empty.
Functions ¶
func MeasureLatency ¶
func MeasureLatency(observer prometheus.Observer, startTime time.Time)
func MergeMapPercentile ¶
func MergeMapPercentile(m1, m2 map[string]*Percentile, count float64) map[string]*Percentile
func NewPromethousNoopRegistry ¶
func NewPromethousNoopRegistry() prometheus.Registerer
func NewPromethousRegistry ¶
func NewPromethousRegistry() prometheus.Registerer
Types ¶
type Client ¶
type Client interface { io.Closer Incr(string, int64) Gauge(string, int64) GaugeDelta(string, int64) Timing(string, time.Time) }
Client exposes all the behavior for capturing and and sending various measurements to a metrics sink.
func NewNoOpClient ¶
func NewNoOpClient() Client
NewNoOpClient creates a metrics client that does not send any measurements.
func NewStatsDClient ¶
NewStatsDClient creates a metrics client that sends various measurements to StatsD client.
type DKVMetrics ¶
type DKVMetrics struct { TimeStamp int64 `json:"ts"` StoreLatency map[string]*Percentile `json:"storage_latency"` NexusLatency map[string]*Percentile `json:"nexus_latency"` DKVLatency map[string]*Percentile `json:"dkv_latency"` StorageOpsCount map[string]uint64 `json:"storage_ops_count"` StorageOpsErrorCount map[string]float64 `json:"storage_ops_error_count"` NexusOpsCount map[string]uint64 `json:"nexus_ops_count"` DKVReqCount map[string]uint64 `json:"dkv_req_count"` Count float64 `json:"count"` }
func GetMetrics ¶
func GetMetrics() (*DKVMetrics, error)
func NewDKVMetric ¶
func NewDKVMetric() *DKVMetrics
func (*DKVMetrics) Merge ¶
func (dm *DKVMetrics) Merge(dm1 DKVMetrics)
type Percentile ¶
type Percentile struct { P50 jFloat64 `json:"p50"` P90 jFloat64 `json:"p90"` P99 jFloat64 `json:"p99"` }
func NewPercentile ¶
func NewPercentile(quantile []*dto.Quantile) *Percentile
type StatStreamer ¶
type StatStreamer struct {
// contains filtered or unexported fields
}
func NewStatStreamer ¶
func NewStatStreamer() *StatStreamer
func (*StatStreamer) DeRegister ¶
func (sp *StatStreamer) DeRegister(id int64)
func (*StatStreamer) Register ¶
func (sp *StatStreamer) Register(outputChannel chan DKVMetrics) int64
func (*StatStreamer) Run ¶
func (sp *StatStreamer) Run()
Click to show internal directories.
Click to hide internal directories.