Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
There is already a tool for that: http://pypi.python.org/pypi/line_profiler/
Integrating that functionality to Yappi seems to require enourmous effort that
I seem not to have. However, I will leave this issue open as someone might want
to volunteer.
Original comment by sum...@gmail.com
on 28 Feb 2011 at 3:25
I'd like to see this too, perhaps this could be done in a relatively simple
way, change from
(file_name, function_name) => (count, time, ...) to
(file_name, function_name, line_number) => (count, time, ...)
as far as I understand line_profiler in the comment above is a deterministic
profiler, while yappi is statistical profiler, there's a world of difference
between the applicability of the two.
Original comment by dim...@gmail.com
on 8 Aug 2012 at 2:20
You are right about that they are two different applications with different use
cases. However, yappi is not a statistical profiler, it exatcly determines each
function entry/exit CPU time deterministically.
I don't understand your comment on changing:
(file_name, function_name) => (count, time, ...) to
(file_name, function_name, line_number) => (count, time, ...)
You means the profiler statistics?
Original comment by sum...@gmail.com
on 13 Dec 2012 at 10:07
Currently yappi is deterministic function enter/exit profiler.
I would like to to be deterministic function and line profiler.
That is, if it is easy to implement, in addition to function entry/exit yappi
could also count how many times a given line is executed.
For example I would like to recover stats like these:
def foo(x, y=1): return x*y # called 5000 times
def loop(): # called 1 time
for i in range(100):
xxx = int("".join([...])) # executed 100 times
assert xxx == 10 # executed 100 times
for x in range(xxx):
yyy = int("".join([...])) # executed 1000 times
assert yyy = 5 # executed 1000 times
for y in range(yyy):
foo(x, y) # executed 5000 times (*)
I don't know if it is or is not easy to implement this in yappi.
Original comment by dim...@gmail.com
on 13 Dec 2012 at 10:29
Adding line profiling functionality to yappi will require too much effort. Having simply another project dealing only with line-profiling is better instead of merging thast functionality to yappi itself. Yappi specializes on CPU/Wall clock time profiling of long-running/possibly multithreaded Python applications.
Original comment by sum...@gmail.com
on 25 Jun 2014 at 9:04
Original comment by sum...@gmail.com
on 25 Jun 2014 at 9:04
Original issue reported on code.google.com by
vsapr...@gmail.com
on 21 Jul 2010 at 5:28