Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the devel-nytprof CPAN distribution.

Report information
The Basics
Id: 50766
Status: resolved
Priority: 0/
Queue: devel-nytprof

People
Owner: Nobody in particular
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Provide an equivalent of dprofpp -T
One of the most useful features of DProf was that for any profiling run, you could run a -T on it to get a complete space-indented function trace for the entire application run. The file sizes it spat out tended to be huge, but the information was invaluable for seeing what the hell an application was doing (particularly in the case of watching apps explode in slow motion). I'd very much like to see an equivalent for NYTProf.
The subroutine profiler is currently in-memory only, so the *individual calls* are not available. An output something a little like dprofpp -S could be generated from the aggregated call tree data. What specific use-cases do you have? What questions do you want to be able to answer?
CC: adamk [...] cpan.org
Subject: Re: [rt.cpan.org #50766] Provide an equivalent of dprofpp -T
Date: Sat, 24 Oct 2009 19:30:23 +1100
To: bug-devel-nytprof [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
"How and when, specifically, did my code explode" I normally start at the end of the function trace, and work backwords through the explosion to find the precise place where the problems started. Adam K 2009/10/23 Tim_Bunce via RT <bug-devel-nytprof@rt.cpan.org>: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=50766 > > > The subroutine profiler is currently in-memory only, so the *individual calls* are not available. > > An output something a little like dprofpp -S could be generated from the aggregated call tree > data. > > What specific use-cases do you have? What questions do you want to be able to answer? >
So you definitely need the sub calls streamed to the data file as they happen (not aggregated into a single call graph and dumped at the end, which is what happens currently). It wouldn't be much work to get the info into the data file. Making use of it on the reporting side would be more work, but perhaps Devel::NYTProf::ReadStream would suffice for you. [The reporting code is a complete mess. Ought to be refactored into a rough MVC core and plugins with a single ntprof command frontend.]
You can already get a view of How and when, specifically, did my code explode" from Devel::NYTProf::ReadStream. It's line-by-line rather than call-by-call, but for your use-case that would be even better. Also, more generally, NYTProf isn't a debugger or even an execution tracer - there are other modules on CPAN that are targeting those areas.
I'm going to close this wishlist item as I've noted the requirement in the HACKING file.