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

Method String

model/value.go:181–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179}
180
181func (ss SampleStream) String() string {
182 valuesLength := len(ss.Values)
183 vals := make([]string, valuesLength+len(ss.Histograms))
184 for i, v := range ss.Values {
185 vals[i] = v.String()
186 }
187 for i, v := range ss.Histograms {
188 vals[i+valuesLength] = v.String()
189 }
190 return fmt.Sprintf("%s =>\n%s", ss.Metric, strings.Join(vals, "\n"))
191}
192
193func (ss SampleStream) MarshalJSON() ([]byte, error) {
194 switch {

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected