diff options
-rw-r--r-- | synapse/metrics/metric.py | 5 | ||||
-rw-r--r-- | tests/metrics/test_metric.py | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/synapse/metrics/metric.py b/synapse/metrics/metric.py index 8ba13075f7..17cd673891 100644 --- a/synapse/metrics/metric.py +++ b/synapse/metrics/metric.py @@ -127,9 +127,8 @@ class TimerMetric(CounterMetric): def render_item(self, k): keystr = self._render_key(k) - return ["%s%s:count %d" % (self.name, keystr, self.counts[k]), - "%s%s:msec %d" % (self.name, keystr, self.times[k])] - + return ["%s:count%s %d" % (self.name, keystr, self.counts[k]), + "%s:msec%s %d" % (self.name, keystr, self.times[k])] class CacheMetric(object): diff --git a/tests/metrics/test_metric.py b/tests/metrics/test_metric.py index fefe1a5867..75b6cbc924 100644 --- a/tests/metrics/test_metric.py +++ b/tests/metrics/test_metric.py @@ -124,10 +124,10 @@ class TimerMetricTestCase(unittest.TestCase): metric.inc_time(800, "INSERT") self.assertEquals(metric.render(), [ - "queries{verb=INSERT}:count 1", - "queries{verb=INSERT}:msec 800", - "queries{verb=SELECT}:count 2", - "queries{verb=SELECT}:msec 500", + "queries:count{verb=INSERT} 1", + "queries:msec{verb=INSERT} 800", + "queries:count{verb=SELECT} 2", + "queries:msec{verb=SELECT} 500", ]) |