diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-10 15:54:16 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-12 16:24:51 +0000 |
commit | c1cdd7954d7cc411a5ec926148b9060e59b8a7bd (patch) | |
tree | 133e3be7af74956833d1987dba1822e49265ea12 /tests/metrics | |
parent | Rename the timer metrics exported by synapse.storage to append _time, so the ... (diff) | |
download | synapse-c1cdd7954d7cc411a5ec926148b9060e59b8a7bd.tar.xz |
Add an .inc_by() method to CounterMetric; implement DistributionMetric a neater way
Diffstat (limited to '')
-rw-r--r-- | tests/metrics/test_metric.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/metrics/test_metric.py b/tests/metrics/test_metric.py index 1ca3e45a26..6009014297 100644 --- a/tests/metrics/test_metric.py +++ b/tests/metrics/test_metric.py @@ -35,8 +35,7 @@ class CounterMetricTestCase(unittest.TestCase): 'scalar 1', ]) - counter.inc() - counter.inc() + counter.inc_by(2) self.assertEquals(counter.render(), [ 'scalar 3' @@ -125,8 +124,8 @@ class DistributionMetricTestCase(unittest.TestCase): self.assertEquals(metric.render(), [ 'queries:count{verb="INSERT"} 1', - 'queries:total{verb="INSERT"} 800', 'queries:count{verb="SELECT"} 2', + 'queries:total{verb="INSERT"} 800', 'queries:total{verb="SELECT"} 500', ]) |