mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #82583 from RainbowMango/pr_wrap_buckets_functionality
Add wrapper for prometheus buckets functionality
This commit is contained in:
commit
ab8bb23ad3
@ -21,6 +21,19 @@ import (
|
|||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// DefBuckets is a wrapper for prometheus.DefBuckets
|
||||||
|
var DefBuckets = prometheus.DefBuckets
|
||||||
|
|
||||||
|
// LinearBuckets is a wrapper for prometheus.LinearBuckets.
|
||||||
|
func LinearBuckets(start, width float64, count int) []float64 {
|
||||||
|
return prometheus.LinearBuckets(start, width, count)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExponentialBuckets is a wrapper for prometheus.ExponentialBuckets.
|
||||||
|
func ExponentialBuckets(start, factor float64, count int) []float64 {
|
||||||
|
return prometheus.ExponentialBuckets(start, factor, count)
|
||||||
|
}
|
||||||
|
|
||||||
// Histogram is our internal representation for our wrapping struct around prometheus
|
// Histogram is our internal representation for our wrapping struct around prometheus
|
||||||
// histograms. Summary implements both kubeCollector and ObserverMetric
|
// histograms. Summary implements both kubeCollector and ObserverMetric
|
||||||
type Histogram struct {
|
type Histogram struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user