On Thu, Jul 25, 2013 at 03:33:52AM -0700, [email protected] wrote:
>    Hi,

Hi Holger.

>    we from [1]www.plat-forms.org want to use NYTProf as a profiling tool. 
> plat_forms is a web development
>    platforms contest and we have several perl solutions, where we want use 
> NYTProf to analyze the methods
>    called after an HTTP request is sent.
> 
>    We also have Java and C# solutions, and for the profiling there we use 
> yourkit
>    ([2]http://www.yourkit.com). To make the results comparable I want to 
> write want to add a reporter that
>    prints similar to the yourkit report. The report is a CSV file with the 
> following columns:
> 
>    Name / Filename, Total time, Avg. Time, Own Time, Invocation Count, Level
> 
>    One line corresponds to one location that calls a subroutine. If I 
> understand the docs correct
>    ([3]Subroutine_Profiling) this is exactly the way NYTProf collects data on 
> the methods. The fields total
>    time
> 
>    I was planning to write a reporter that outputs just the CSV I need. I am 
> new to NYTProf and I am not
>    sure what is the best way to start this... Is Data.pm the place to start? 
> How do I use it to access just
>    the subroutine calls, not the source lines?

The API isn't very stable or documented, as you've discovered.
The best general approach is to find where the information you want
is displayed in the nytprofhtml report and then look at the code
that implements that part of the report.

For example, subroutine_table(), when called with no $fi arg, iterates
over all the subs, and report_src_line() has code that iterates over
all the callers to subs defined on a line and all the calls made to subs
by a line. See also bin/nytprofcg.

Those should get you started.

Have fun!

Tim.

-- 
-- 
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]
--- 
You received this message because you are subscribed to the Google Groups 
"Devel::NYTProf Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to