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

Method String

model/value_histogram.go:89–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

WriteRuneMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected