(self)
| 207 | self.assertEqual([hfm], list(families)) |
| 208 | |
| 209 | def test_native_histogram(self): |
| 210 | families = text_string_to_metric_families("""# TYPE nativehistogram histogram |
| 211 | # HELP nativehistogram Is a basic example of a native histogram |
| 212 | nativehistogram {count:24,sum:100,schema:0,zero_threshold:0.001,zero_count:4,positive_spans:[0:2,1:2],negative_spans:[0:2,1:2],positive_deltas:[2,1,-3,3],negative_deltas:[2,1,-2,3]} |
| 213 | # EOF |
| 214 | """) |
| 215 | families = list(families) |
| 216 | |
| 217 | hfm = HistogramMetricFamily("nativehistogram", "Is a basic example of a native histogram") |
| 218 | hfm.add_sample("nativehistogram", None, None, None, None, NativeHistogram(24, 100, 0, 0.001, 4, (BucketSpan(0, 2), BucketSpan(1, 2)), (BucketSpan(0, 2), BucketSpan(1, 2)), (2, 1, -3, 3), (2, 1, -2, 3))) |
| 219 | self.assertEqual([hfm], families) |
| 220 | |
| 221 | def test_native_histogram_utf8(self): |
| 222 | families = text_string_to_metric_families("""# TYPE "native{histogram" histogram |
nothing calls this directly
no test coverage detected