mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 08:56:04 -04:00
Add an .inc_by() method to CounterMetric; implement DistributionMetric a neater way
This commit is contained in:
parent
63cb7ece62
commit
c1cdd7954d
2 changed files with 16 additions and 26 deletions
|
@ -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',
|
||||
])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue