mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-02 22:56:06 -04:00
Add GaugeMetric
This commit is contained in:
parent
233699c42e
commit
ab825aa328
2 changed files with 38 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue