I use cProfile now but I find it tedious to write pstats code just to query the statistics data. I'm looking for a visual tool that shows me what my Python code is doing in terms of CPU time and memory allocation. Some examples from the Java world are visualvm and JProfiler. Does something li...
Project Euler and other coding contests often have a maximum time to run or people boast of how fast their particular solution runs. With Python, sometimes the approaches are somewhat kludgey - i.e., adding timing code to __main__. What is a good way to profile how long a Python program takes to...
I believe that's what Robert Kern's line_profiler is intended for. From the link: File: pystone.py Function: Proc2 at line 149 Total time: 0.606656 s Line # Hits Time Per Hit % Time Line Contents ============================================================== 149 ...
I want to use the excellent line_profiler, but only some of the time. To make it work I add @profile before every function call, e.g. @profile def myFunc(args): blah return and execute kernprof.py -l -v mycode.py args But I don't want to have to put the @profile decorators in by ...
« first day (393 days earlier) ← previous day next day → last day (841 days later) »