(self)
| 107 | self.assertEqual([summary], list(families)) |
| 108 | |
| 109 | def test_summary_quantiles(self): |
| 110 | families = text_string_to_metric_families("""# TYPE a summary |
| 111 | # HELP a help |
| 112 | a_count 1 |
| 113 | a_sum 2 |
| 114 | a{quantile="0.5"} 0.7 |
| 115 | a{quantile="1"} 0.8 |
| 116 | # EOF |
| 117 | """) |
| 118 | # The Python client doesn't support quantiles, but we |
| 119 | # still need to be able to parse them. |
| 120 | metric_family = SummaryMetricFamily("a", "help", count_value=1, sum_value=2) |
| 121 | metric_family.add_sample("a", {"quantile": "0.5"}, 0.7) |
| 122 | metric_family.add_sample("a", {"quantile": "1"}, 0.8) |
| 123 | self.assertEqual([metric_family], list(families)) |
| 124 | |
| 125 | def test_simple_histogram(self): |
| 126 | families = text_string_to_metric_families("""# TYPE a histogram |
nothing calls this directly
no test coverage detected