Created
January 25, 2018 22:01
-
-
Save justecorruptio/3e5d030b5b55b70ce1b2c1eded484740 to your computer and use it in GitHub Desktop.
inline debugger
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 cProfile, logging, cStringIO, pstats | |
prof = cProfile.Profile() | |
score_list = prof.runcall(model.score, scoring_data) | |
prof.create_stats() | |
stream = cStringIO.StringIO() | |
stats = pstats.Stats(prof, stream=stream) | |
stats.strip_dirs().sort_stats('time').print_stats(20) | |
#print stream.getvalue() | |
logging.getLogger().info(stream.getvalue()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment