We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4916ffa commit 52994d9Copy full SHA for 52994d9
1 file changed
tests/test_parser.py
@@ -172,6 +172,19 @@ def test_escaping(self):
172
metric_family.add_metric(["b\\a\\z"], 2)
173
self.assertEqual([metric_family], list(families))
174
175
+ def test_timestamps_discarded(self):
176
+ families = text_string_to_metric_families("""# TYPE a counter
177
+# HELP a help
178
+a{foo="bar"} 1\t000
179
+# TYPE b counter
180
+# HELP b help
181
+b 2 1234567890
182
+""")
183
+ a = CounterMetricFamily("a", "help", labels=["foo"])
184
+ a.add_metric(["bar"], 1)
185
+ b = CounterMetricFamily("b", "help", value=2)
186
+ self.assertEqual([a, b], list(families))
187
+
188
@unittest.skipIf(sys.version_info < (2, 7), "Test requires Python 2.7+.")
189
def test_roundtrip(self):
190
text = """# HELP go_gc_duration_seconds A summary of the GC invocation durations.
0 commit comments