Last active
June 25, 2019 18:50
-
-
Save matrix303/a0c94e915afdfd507d3893625b10463c to your computer and use it in GitHub Desktop.
Profiling Python File RunTime #pythonTips
This file contains hidden or 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
| c_profiler -> gives times of functions | |
| line_profiler -> gives times of line by lie | |
| #@profile -> needed for linebyline | |
| def func(): | |
| aklw;ejlkajselksjlkjaslkejawlkjwel;kaj | |
| terminal: python -m cProfile -s cumulative profileme.py | |
| terminal: kernprof -l -v profileme.py #todo cpu profiling line-by-line -> needs @profile for the func you need lbyl for | |
| terminal: python -m memory_profiler profileme.py #todo memory profiling -> need @profile for func you want memory details for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment