MCPcopy
hub / github.com/prometheus/client_golang / TestMetricVecWithCollisions

Function TestMetricVecWithCollisions

prometheus/vec_test.go:274–285  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

272}
273
274func TestMetricVecWithCollisions(t *testing.T) {
275 vec := NewGaugeVec(
276 GaugeOpts{
277 Name: "test",
278 Help: "helpless",
279 },
280 []string{"l1", "l2"},
281 )
282 vec.hashAdd = func(h uint64, s string) uint64 { return 1 }
283 vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 }
284 testMetricVec(t, vec)
285}
286
287func testMetricVec(t *testing.T, vec *GaugeVec) {
288 vec.Reset() // Actually test Reset now!

Callers

nothing calls this directly

Calls 2

testMetricVecFunction · 0.85
NewGaugeVecFunction · 0.70

Tested by

no test coverage detected