Hi TIm, all

It is not easy to find topics in this google group, so I write my issues 
here.

I am trying to cherry pick selected values directly in the code, without 
letting nytprof create intermediate documents like html or csv. I just 
want to open the db and select what I need. I am using it for a big piece 
of software that is serving experiments at CERN called ARC [1].

The issue I have now is that I know what kind of stats I want to get from a 
specific line of code but I 
don't really understand how to do it in the code. Here's a sample snippet:

---------------------------------------------------------------------
# get the database file and open it as a perl datastructure
my $perflogdir = '/var/log/arc';
my $dbfile = 'infosys_20160704182046.perflog.raw';
use Devel::NYTProf::Data;
my $profile = Devel::NYTProf::Data->new( { filename => 
$perflogdir.'/'.$dbfile, quiet => 1 } );

# for selected subroutine, get time it took to run
# There is a perl module called GMJobsInfo.pm
# with a subroutine called get_gmjobs
my $subinfo = $profile->subinfo_of('GMJobsInfo::get_gmjobs');
my $getgmjobstotaltime = @{$subinfo}[4];


# for selected line of code, get time it took to run
my $linesinfo = $profile->fileinfo_of('GMJobsInfo.pm');
my $info = @$linesinfo[7];
my $fidline = $info->{fid_line_time};
# 6: id assigned to GMJobsInfo
# 151: line of open local files
# strategy:
# 1. get the pm file id
# 2. get the fid_line_time datastructure
# what is the fastest way? can it be done from $profile?
my $linetime = @{@$fidline[6]}[157];

---------------------------------------------------------------------

But I feel this is a little clunky and not very practical. What is the best 
way to achieve the above in the code?
Getting stats for subroutines and lines of code directly?

Can you show me an example? The csv and html readers are not interesting. 
They parse everything. It is not what I need.

Thanks!
Florido Paganelli,
Lund University [2], 
NorduGrid Collaboration [3]
Homepage: http://www.hep.lu.se/staff/paganelli/doku.php/florido_paganelli



[1] ARC middleware, http://www.nordugrid.org/arc/
[2] Lund University, www.lu.se
[3] NorduGrid, http://www.nordugrid.org/

-- 
-- 
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:  develnytprof-dev@googlegroups.com
To unsubscribe, email:  develnytprof-dev-unsubscr...@googlegroups.com
--- 
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 develnytprof-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to