MCPcopy
hub / github.com/grafana/tempo / ValidateHistogramBuckets

Function ValidateHistogramBuckets

modules/generator/validation/fields.go:143–150  ·  view source on GitHub ↗
(buckets []float64, field string)

Source from the content-addressed store, hash-verified

141}
142
143func ValidateHistogramBuckets(buckets []float64, field string) error {
144 for i, bucket := range buckets {
145 if i > 0 && bucket <= buckets[i-1] {
146 return fmt.Errorf("%s must be strictly increasing: bucket[%d]=%g is <= bucket[%d]=%g", field, i, bucket, i-1, buckets[i-1])
147 }
148 }
149 return nil
150}
151
152func ValidateNativeHistogramBucketFactor(factor float64) error {
153 if factor <= 1 {

Callers 2

ValidateMethod · 0.92
ValidateMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected