develooper Front page | perl.perl5.porters | Postings from August 2008

Re: Devel::NYTProf and Devel::Cover overlap and cross-polination

Thread Previous
From:
Tim Bunce
Date:
August 1, 2008 02:30
Subject:
Re: Devel::NYTProf and Devel::Cover overlap and cross-polination
Message ID:
20080801092958.GA22085@timac.local
On Thu, Jul 31, 2008 at 10:54:45AM -0700, Adam Kaplan wrote:
> On 21 Jul, 16:13, Tim.Bu...@pobox.com (Tim Bunce) wrote:
> > On Thu, Jul 17, 2008 at 11:49:06AM +0200, Paul Johnson wrote:
> >
> > > Hi Tim,
> >
> > > I've not had the chance to try the module, but based on what you have
> > > written, do you think there might be any chance of somehow merging the
> > > backends of Nytprof and Devel::Cover?
> >
> > I don't see much benefit at first sight. Profiling and coverage analysis
> > use similar technology (and may benefit from cross-pollination of
> > implementation ideas) but they're very different user activities.
> >
> > Please excuse the tersness of my responses below.
> > They simply reflect an "I don't get it" point of view.
> >
> > > (The corporate firewall took
> > > exception to your blog, so I've only seen it via links.)
> >
> > Any idea why? (Perhaps reply offline. I could email a copy if you'd like.)
> >
> > > As you know, Devel::Cover has something of a statement level profiler
> > > included, and Nytprof output is based on that of Devel::Cover.
> >
> > The visual style is similar but the coode looks quite different.
> >
> > > It would be great to be able to replace Devel::Cover's basic statement
> > > level profiler with Nytprof and combine the output.
> >
> > Why?
> >
> > > This would also
> > > give Nytprof access to the other reports in Devel::Cover.
> >
> > Such as?
> >
> > > This could either be done at the level of the Devel::Cover database,
> > > or using the annotation facility available to Devel::Cover reports.
> >
> > > Does this seem worth pursuing?
> >
> > Not at first sight, but perhaps I'm just being dense and missing something.
> > Feel free to persuade me!
> 
> Paul,
> 
> Data pertaining to what lines are hit during execution are definitely
> maintained by the nytprof database, so coverage reporting is
> definitely possible.

Coverage at the statement level, sure, but Devel::Cover already offers
not just statement level coverage but also branch and condition coverage.

I think it boils down to two issues:

* The nature of the tasks given to code during coverage analysis is
  different to the tasks given to code during performance analysis.

* I don't see sufficient value in profiling at code at finer than
  statement level (until NYTProf most developers were happy enough
  with subroutine level profiling).

Pperhaps, Paul, you could explain more about what you were envisaging.

Tim.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About