pytelegraf
pytelegraf copied to clipboard
Add a context manager and decorator for timing metrics.
Allows the use of
with client.timer('some_metric'):
<some code>
with client.timer('some_metric', use_ms=True):
<some code>
@client.timer('some_metric', use_ms=True)
def my_function():
pass