Documentation ¶
Overview ¶
Package metrics defines metrics utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HistogramBucket ¶
type HistogramBucket struct { Scale string `json:"scale"` LowerBound float64 `json:"lower-bound"` UpperBound float64 `json:"upper-bound"` Count uint64 `json:"count"` }
HistogramBucket represents metrics latency bucket.
func (HistogramBucket) String ¶
func (bucket HistogramBucket) String() string
type HistogramBuckets ¶
type HistogramBuckets []HistogramBucket
func MergeHistograms ¶
func MergeHistograms(a HistogramBuckets, b HistogramBuckets) (HistogramBuckets, error)
MergeHistograms merges two histograms.
func ParseHistogram ¶
func ParseHistogram(scale string, histo *dto.Histogram) (buckets HistogramBuckets, err error)
ParseHistogram parses Prometheus histogram.
func (HistogramBuckets) Len ¶
func (buckets HistogramBuckets) Len() int
func (HistogramBuckets) Less ¶
func (buckets HistogramBuckets) Less(i, j int) bool
func (HistogramBuckets) Swap ¶
func (buckets HistogramBuckets) Swap(i, j int)
func (HistogramBuckets) Table ¶ added in v1.2.0
func (buckets HistogramBuckets) Table() string
Table converts "HistogramBuckets" to table.
type RequestsSummary ¶ added in v1.2.2
type RequestsSummary struct { // SuccessTotal is the number of successful client requests. SuccessTotal float64 `json:"success-total" read-only:"true"` // FailureTotal is the number of failed client requests. FailureTotal float64 `json:"failure-total" read-only:"true"` // LatencyHistogram is the client requests latency histogram. LatencyHistogram HistogramBuckets `json:"latency-histogram,omitempty" read-only:"true"` }
RequestsSummary represents request results.
func (RequestsSummary) JSON ¶ added in v1.2.2
func (rs RequestsSummary) JSON() string
func (RequestsSummary) Table ¶ added in v1.2.2
func (rs RequestsSummary) Table() string
Click to show internal directories.
Click to hide internal directories.