Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from osprofiler import profiler
@profiler.trace_cls('A', info={'crap': 'crap'})
class A(object):
def c(self):
pass
a = A()
print(a.c.__traced_name__)
print(a.c.__traced_info__)
@profiler.trace_cls('B', info={'crap': 'crap2'})
class B(A):
def e(self):
pass
a = A()
print(a.c.__traced_name__)
print(a.c.__traced_info__)
b = B()
print(b.c.__traced_name__)
print(b.c.__traced_info__)
print(b.e.__traced_name__)
print(b.e.__traced_info__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment