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

Method test_gauge

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

Source from the content-addressed store, hash-verified

95""", generate_latest(self.registry))
96
97 def test_gauge(self):
98 g = Gauge('gg', 'A gauge', registry=self.registry)
99 g.set(17)
100 self.assertEqual(b'# HELP gg A gauge\n# TYPE gg gauge\ngg 17.0\n', generate_latest(self.registry))
101
102 def test_summary(self):
103 s = Summary('ss', 'A summary', ['a', 'b'], registry=self.registry)

Callers

nothing calls this directly

Calls 3

setMethod · 0.95
GaugeClass · 0.90
generate_latestFunction · 0.90

Tested by

no test coverage detected