Skip to content

Instantly share code, notes, and snippets.

@harlowja
Created January 25, 2016 20:46
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/0ea75d44eb1b9c0ed7d9 to your computer and use it in GitHub Desktop.
Save harlowja/0ea75d44eb1b9c0ed7d9 to your computer and use it in GitHub Desktop.
from osprofiler import profiler
my_special_crap = {'stuff': 'stuff'}
@profiler.trace('b', info=my_special_crap)
def a():
print 'during-a-called'
print my_special_crap
b()
print 'after-b-called'
print my_special_crap
print 'end-a-called'
@profiler.trace('b', info=my_special_crap)
def b():
print 'during-b-called'
print my_special_crap
print 'end-b-called'
a()
print my_special_crap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment