Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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()
 
PREVIOUS NEXT
Tagged: #cprofile #usage #python
ADD COMMENT
Topic
Name
2+9 =