Created
February 5, 2016 19:47
-
-
Save harlowja/0dc708a09e535632e6f8 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() | |
# And so is this one?? but with 'a' trace, huh... | |
b = A() | |
a.hello() | |
# Works, not traced | |
my_old_e() | |
# Doesn't barf???, but isn't traced either :-/ | |
b.e() | |
# Barfs | |
a.e() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment