Skip to content

Allow starting and stopping timed() manually#155

Merged
yannmh merged 1 commit intoDataDog:masterfrom
tuukkamustonen:timed-manual-calls
Sep 13, 2016
Merged

Allow starting and stopping timed() manually#155
yannmh merged 1 commit intoDataDog:masterfrom
tuukkamustonen:timed-manual-calls

Conversation

@tuukkamustonen
Copy link
Copy Markdown

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
Copy Markdown
Author

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

@yannmh
Copy link
Copy Markdown

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
Copy Markdown

yannmh commented Sep 13, 2016

Looks great. Thanks again @tuukkamustonen.

@yannmh yannmh merged commit 9467b28 into DataDog:master Sep 13, 2016
@tuukkamustonen
Copy link
Copy Markdown
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
Copy Markdown

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