Skip to content

Instantly share code, notes, and snippets.

@harlowja
Created January 25, 2016 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harlowja/851679cc5f513aa54a94 to your computer and use it in GitHub Desktop.
Save harlowja/851679cc5f513aa54a94 to your computer and use it in GitHub Desktop.
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