summary refs log tree commit diff
path: root/synapse/metrics/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-04-11 11:07:33 +0100
committerErik Johnston <erik@matrix.org>2018-04-11 12:13:40 +0100
commitab825aa328e089b28cf858332bb95f47e1490377 (patch)
tree0ad6c76a9d6c7cd6541217d1e27b6d23b96c7781 /synapse/metrics/__init__.py
parentMerge pull request #2760 from Valodim/pypy (diff)
downloadsynapse-ab825aa328e089b28cf858332bb95f47e1490377.tar.xz
Add GaugeMetric
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r--synapse/metrics/__init__.py9
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: