Esempio n. 1
0
 def __init__(self, registry=None, reporting_interval=30, clock=None):
     self.registry = registry or global_registry()
     self.reporting_interval = reporting_interval
     self.clock = clock or time
     self._stopped = Event()
     self._loop_thread = Thread(target=self._loop)
     self._loop_thread.setDaemon(True)
Esempio n. 2
0
def gauge(key, gauge=None, default=float("nan"), **dims):
    """Adds gauge with dimensions to the global pyformance registry"""
    return global_registry().gauge(key, gauge=gauge, default=default, **dims)
Esempio n. 3
0
def timer(key, **dims):
    """Adds timer with dimensions to the global pyformance registry"""
    return global_registry().timer(key, **dims)
Esempio n. 4
0
def histogram(key, **dims):
    """Adds histogram with dimensions to the global pyformance registry"""
    return global_registry().histogram(key, **dims)
Esempio n. 5
0
 def __init__(self, registry=None, reporting_interval=30, clock=None):
     self.registry = registry or global_registry()
     self.reporting_interval = reporting_interval
     self.clock = clock or time
     self._stopped = Event()
     self.create_thread()
Esempio n. 6
0
def gauge(key, gauge=None, default=float("nan"), **dims):
    """Adds gauge with dimensions to the global pyformance registry"""
    return global_registry().gauge(key, gauge=gauge, default=default, **dims)
Esempio n. 7
0
def timer(key, **dims):
    """Adds timer with dimensions to the global pyformance registry"""
    return global_registry().timer(key, **dims)
Esempio n. 8
0
def histogram(key, **dims):
    """Adds histogram with dimensions to the global pyformance registry"""
    return global_registry().histogram(key, **dims)