Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow starting and stopping timed() manually #155

Merged
merged 1 commit into from
Sep 13, 2016

Conversation

tuukkamustonen
Copy link

Added support for manually starting and stopping a timer.

Now it can be used something like this:

@app.before_request
def before():
    request.page_load_timer = statsd.timed('metric')
    request.page_load_timer.start()

@app.after_request
def after():
    request.page_load_timer.stop()

@tuukkamustonen
Copy link
Author

@yannmh Would you have time to review this and #154 ?

@yannmh
Copy link
Member

yannmh commented Sep 9, 2016

Apologies for my late answer @tuukkamustonen 🙇 . I was busy working on a different project and missed your PR.

I'll review your changes next week and keep you updated. Thanks a lot for your contribution!

@yannmh yannmh self-assigned this Sep 9, 2016
@yannmh yannmh added this to the 0.14.0 milestone Sep 9, 2016
@yannmh
Copy link
Member

yannmh commented Sep 13, 2016

Looks great. Thanks again @tuukkamustonen.

@yannmh yannmh merged commit 9467b28 into DataDog:master Sep 13, 2016
@tuukkamustonen
Copy link
Author

@yannmh Thanks. Any chance for a new release?

@tuukkamustonen tuukkamustonen deleted the timed-manual-calls branch September 14, 2016 17:03
@yannmh
Copy link
Member

yannmh commented Sep 14, 2016

@tuukkamustonen yes, there are a few things I want to check/merge before.

I plan to release by the end of the week 🎉

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.

2 participants