(self)
| 72 | self.assertEqualMetrics([metric_family], list(families)) |
| 73 | |
| 74 | def test_simple_histogram(self): |
| 75 | families = text_string_to_metric_families("""# TYPE a histogram |
| 76 | # HELP a help |
| 77 | a_bucket{le="1"} 0 |
| 78 | a_bucket{le="+Inf"} 3 |
| 79 | a_count 3 |
| 80 | a_sum 2 |
| 81 | """) |
| 82 | self.assertEqualMetrics([HistogramMetricFamily("a", "help", sum_value=2, buckets=[("1", 0.0), ("+Inf", 3.0)])], |
| 83 | list(families)) |
| 84 | |
| 85 | def test_no_metadata(self): |
| 86 | families = text_string_to_metric_families("""a 1 |
nothing calls this directly
no test coverage detected