Created
February 5, 2016 19:50
-
-
Save harlowja/6dc4eb90bf150eaeca29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from osprofiler import profiler | |
def big_e(): | |
pass | |
class A(object): | |
@staticmethod | |
def e(): | |
print 'b' | |
def hello(self): | |
A.e() | |
# This one isn't traced | |
a = A() | |
a.hello() | |
my_old_e = A.e | |
# This one now is traced. | |
a = profiler.trace_cls('a')(a) | |
a.hello() | |
# Works, not traced, should it have been? | |
my_old_e() | |
# Barfs | |
a.e() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment