MCPcopy Create free account
hub / github.com/prometheus/common / String

Method String

model/value_histogram.go:88–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86}
87
88func (b HistogramBucket) String() string {
89 var sb strings.Builder
90 lowerInclusive := b.Boundaries == 1 || b.Boundaries == 3
91 upperInclusive := b.Boundaries == 0 || b.Boundaries == 3
92 if lowerInclusive {
93 sb.WriteRune('[')
94 } else {
95 sb.WriteRune('(')
96 }
97 fmt.Fprintf(&sb, "%g,%g", b.Lower, b.Upper)
98 if upperInclusive {
99 sb.WriteRune(']')
100 } else {
101 sb.WriteRune(')')
102 }
103 fmt.Fprintf(&sb, ":%v", b.Count)
104 return sb.String()
105}
106
107type HistogramBuckets []*HistogramBucket
108

Callers

nothing calls this directly

Calls 2

WriteRuneMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected