Skip to content

Instantly share code, notes, and snippets.

@ngehlenborg
Created August 19, 2015 01:05
Show Gist options
  • Save ngehlenborg/1da407292acadb430489 to your computer and use it in GitHub Desktop.
Save ngehlenborg/1da407292acadb430489 to your computer and use it in GitHub Desktop.
Yappi profiling in current thread using wall clock time.
import yappi
yappi.set_clock_type("wall")
yappi.start(builtins=False,profile_threads=False)
# code to profile goes here
yappi.get_thread_stats().print_all()
yappi.stop()
yappi.clear_stats()
@ngehlenborg
Copy link
Author

Requires yappi to be installed: pip install yappi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment