Answers for "cprofile usage python"

1

cprofile usage python

pr = cProfile.Profile()
pr.enable()
#code to execute
pr.print_stats(sort='tottime') 
# other sorting methods here:
# https://docs.python.org/3/library/profile.html#pstats.Stats.sort_stats
pr.disable()
Posted by: Guest on April-13-2020

Python Answers by Framework

Browse Popular Code Answers by Language