pytelegraf icon indicating copy to clipboard operation
pytelegraf copied to clipboard

Add a context manager and decorator for timing metrics.

Open srfraser opened this issue 7 years ago • 0 comments

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

srfraser avatar Jan 24 '19 10:01 srfraser