Read and sort a saved profile run.
Section: Performance Hotspots
Inspect saved profile stats
python
python
import pstats
stats = pstats.Stats('profile.stats')
stats.sort_stats('cumtime').print_stats(30)Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Performance Hotspots