diff options
author | Erik Johnston <erik@matrix.org> | 2018-04-11 11:07:33 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-04-11 12:13:40 +0100 |
commit | ab825aa328e089b28cf858332bb95f47e1490377 (patch) | |
tree | 0ad6c76a9d6c7cd6541217d1e27b6d23b96c7781 /synapse/metrics/__init__.py | |
parent | Merge pull request #2760 from Valodim/pypy (diff) | |
download | synapse-ab825aa328e089b28cf858332bb95f47e1490377.tar.xz |
Add GaugeMetric
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r-- | synapse/metrics/__init__.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py index 2ed82b04a5..2666f982a6 100644 --- a/synapse/metrics/__init__.py +++ b/synapse/metrics/__init__.py @@ -23,7 +23,7 @@ from twisted.internet import reactor from .metric import ( CounterMetric, CallbackMetric, DistributionMetric, CacheMetric, - MemoryUsageMetric, + MemoryUsageMetric, GaugeMetric, ) from .process_collector import register_process_collector @@ -65,6 +65,13 @@ class Metrics(object): """ return self._register(CounterMetric, *args, **kwargs) + def register_gauge(self, *args, **kwargs): + """ + Returns: + GaugeMetric + """ + return self._register(GaugeMetric, *args, **kwargs) + def register_callback(self, *args, **kwargs): """ Returns: |