diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-10 15:21:03 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-12 16:24:51 +0000 |
commit | f1fbe3e09f5573ac7ea9159635b02cc579e19720 (patch) | |
tree | 758b9d1c934f51add7a28aa13771ec5bddd4db6d /synapse/metrics/__init__.py | |
parent | Pretend the 'getEvent' cache is just another cache in the set of all the othe... (diff) | |
download | synapse-f1fbe3e09f5573ac7ea9159635b02cc579e19720.tar.xz |
Rename TimerMetric to DistributionMetric; as it could count more than just time
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r-- | synapse/metrics/__init__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py index 1acaa3fd09..c161c17e9f 100644 --- a/synapse/metrics/__init__.py +++ b/synapse/metrics/__init__.py @@ -19,7 +19,9 @@ from __future__ import absolute_import import logging from resource import getrusage, getpagesize, RUSAGE_SELF -from .metric import CounterMetric, CallbackMetric, TimerMetric, CacheMetric +from .metric import ( + CounterMetric, CallbackMetric, DistributionMetric, CacheMetric +) logger = logging.getLogger(__name__) @@ -59,8 +61,8 @@ class Metrics(object): def register_callback(self, *args, **kwargs): return self._register(CallbackMetric, *args, **kwargs) - def register_timer(self, *args, **kwargs): - return self._register(TimerMetric, *args, **kwargs) + def register_distribution(self, *args, **kwargs): + return self._register(DistributionMetric, *args, **kwargs) def register_cache(self, *args, **kwargs): return self._register(CacheMetric, *args, **kwargs) |