MCPcopy Index your code
hub / github.com/prometheus/client_python / test_counter_total

Method test_counter_total

tests/test_exposition.py:86–95  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

84""", generate_latest(self.registry))
85
86 def test_counter_total(self):
87 c = Counter('cc_total', 'A counter', registry=self.registry)
88 c.inc()
89 self.assertEqual(b"""# HELP cc_total A counter
90# TYPE cc_total counter
91cc_total 1.0
92# HELP cc_created A counter
93# TYPE cc_created gauge
94cc_created 123.456
95""", generate_latest(self.registry))
96
97 def test_gauge(self):
98 g = Gauge('gg', 'A gauge', registry=self.registry)

Callers

nothing calls this directly

Calls 3

incMethod · 0.95
CounterClass · 0.90
generate_latestFunction · 0.90

Tested by

no test coverage detected