MCPcopy Create free account
hub / github.com/prometheus/client_python / test_gaugehistogram

Method test_gaugehistogram

tests/test_core.py:829–832  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

827 self.assertEqual(3, self.registry.get_sample_value('h_sum', {'a': 'b'}))
828
829 def test_gaugehistogram(self):
830 self.custom_collector(GaugeHistogramMetricFamily('h', 'help', buckets=[('0', 1), ('+Inf', 2)]))
831 self.assertEqual(1, self.registry.get_sample_value('h_bucket', {'le': '0'}))
832 self.assertEqual(2, self.registry.get_sample_value('h_bucket', {'le': '+Inf'}))
833
834 def test_gaugehistogram_labels(self):
835 cmf = GaugeHistogramMetricFamily('h', 'help', labels=['a'])

Callers

nothing calls this directly

Calls 3

custom_collectorMethod · 0.95
get_sample_valueMethod · 0.80

Tested by

no test coverage detected