Skip to content

Add a context manager and decorator for timing metrics.#13

Open
srfraser wants to merge 4 commits intopaksu:masterfrom
srfraser:helpers
Open

Add a context manager and decorator for timing metrics.#13
srfraser wants to merge 4 commits intopaksu:masterfrom
srfraser:helpers

Conversation

@srfraser
Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant