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

Function BenchmarkLabelSetStringMethod

model/labelset_test.go:164–174  ·  view source on GitHub ↗

Benchmark Results for LabelSet's String() method --------------------------------------------------------------------------------------------------------- goos: linux goarch: amd64 pkg: github.com/prometheus/common/model cpu: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz BenchmarkLabelSetStringMeth

(b *testing.B)

Source from the content-addressed store, hash-verified

162// BenchmarkLabelSetStringMethod-8 732376 1532 ns/op
163
164func BenchmarkLabelSetStringMethod(b *testing.B) {
165 ls := make(LabelSet)
166 ls["monitor"] = "codelab"
167 ls["foo2"] = "bar"
168 ls["foo"] = "bar"
169 ls["abc"] = "prometheus"
170 ls["foo11"] = "bar11"
171 for i := 0; i < b.N; i++ {
172 _ = ls.String()
173 }
174}

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…