Created
April 18, 2016 08:47
-
-
Save candale/4ce63979d74f9d933105e3510856bb7f 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
import pprofile | |
profiler = pprofile.Profile() | |
profiler.enable() | |
# Your slow code here | |
profiler.disable() | |
with open('/some/path/to/profile.prof', 'w') as file_: | |
profiler.callgrind(file_) | |
# Then used KCachegrind to open the file and check out the goodness |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment