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

Function toMetricFamilies

prometheus/wrap_test.go:36–44  ·  view source on GitHub ↗
(cs ...Collector)

Source from the content-addressed store, hash-verified

34}
35
36func toMetricFamilies(cs ...Collector) []*dto.MetricFamily {
37 reg := NewRegistry()
38 reg.MustRegister(cs...)
39 out, err := reg.Gather()
40 if err != nil {
41 panic(err)
42 }
43 return out
44}
45
46func TestWrapRegisterer(t *testing.T) {
47 now := time.Now()

Callers 2

TestWrapRegistererFunction · 0.85
TestWrapCollectorFunction · 0.85

Calls 3

MustRegisterMethod · 0.95
GatherMethod · 0.95
NewRegistryFunction · 0.85

Tested by

no test coverage detected