incubator-allura-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cory Johns" <masterbunn...@users.sf.net>
Subject [allura:tickets] #6387 TimerMiddleware doesn't work with generator functions
Date Mon, 24 Jun 2013 22:03:44 GMT
`timermiddleware:cj/6387`

The timings for the generator end up in `timer_name.next` instead of `timer_name`.  I'd prefer
the timings to go under `timer_name` but then the call counts would be out of whack.


---

** [tickets:#6387] TimerMiddleware doesn't work with generator functions**

**Status:** code-review
**Created:** Mon Jun 24, 2013 02:41 PM UTC by Cory Johns
**Last Updated:** Mon Jun 24, 2013 02:41 PM UTC
**Owner:** Cory Johns

Testing TMW with the following generator function logs a time of 0:

~~~~~
:::python
def time_this(self):
    import time
    time.sleep(5)
    yield 1
~~~~~

More of our SCM code is using generators which are not being tracked properly and could be
hiding critical points.


---

Sent from sourceforge.net because allura-dev@incubator.apache.org is subscribed to https://sourceforge.net/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/allura/admin/tickets/options.
 Or, if this is a mailing list, you can unsubscribe from the mailing list.
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message