SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Devel-Timer rpm build for : OpenSuSE. For other distributions click perl-Devel-Timer.

Name : perl-Devel-Timer
Version : 0.14 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : lp154.1.1 Date : 2023-01-27 18:12:24
Group : Unspecified Source RPM : perl-Devel-Timer-0.14-lp154.1.1.src.rpm
Size : 0.04 MB
Packager : https://www_suse_com/
Summary : Track and report execution time for parts of code
Description :
Devel::Timer allows developers to accurately time how long a specific piece
of code takes to execute. This can be helpful in locating the slowest parts
of an existing application.

First, the Devel::Timer module is used and instantiated.

use Devel::Timer;

my $t = Devel::Timer->new();

Second, markers are placed before and after pieces of code that need to be
timed. For this example, we are profiling the methods get_user_score() and
get_average_user_score().

$t->mark(\'first db query\');
&get_user_score($user);

$t->mark(\'second db query\');
&get_average_user_score();

Finally, at the end of the code that you want to profile, and end marker is
place, and a report is generated on stderr.

$t->mark(\'END\');
$t->report();

Sample report:

Devel::Timer Report -- Total time: 0.3464 secs
Interval Time Percent
----------------------------------------------
02 -> 03 0.3001 86.63% second db query -> END
01 -> 02 0.0461 13.30% first db query -> second db query
00 -> 01 0.0002 0.07% INIT -> first db query

The report is output using the method Devel::Timer::print() which currently
just prints to stderr. If you want to send the output to a custom location
you can override the print() method. The initialize() and shutdown()
methods can also overridden if you want to open and close log files or
database connections.

If you launch your program in a cycle (e.g. it\'s a web app which processes
queries) you might want initialize timer once and then take measurements
repeatedly. In that case you can use reset() method. After calling this
method all accumulated data by timer will be deleted and timer will start
countdown again.

$t->reset();
$t->report();

Sample report:

Devel::Timer Report -- Total time: 0.3462 secs
Interval Time Percent
----------------------------------------------
01 -> 02 0.3001 86.70% second db query -> END
00 -> 01 0.0461 13.30% first db query -> second db query

Pay attention after calling reset() method there will be no mark INIT. This
mark is only set once while calling new() method.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-D/15.4/noarch

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-Devel-Timer-0.14-lp154.1.1.noarch.rpm
     

Provides :
perl(Devel::Timer)
perl-Devel-Timer

Requires :
perl(:MODULE_COMPAT_5.26.1)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.26.1/Devel
/usr/lib/perl5/vendor_perl/5.26.1/Devel/Timer.pm
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Devel-Timer
/usr/share/doc/packages/perl-Devel-Timer/Changes
/usr/share/doc/packages/perl-Devel-Timer/README
/usr/share/licenses/perl-Devel-Timer
/usr/share/licenses/perl-Devel-Timer/LICENSE
/usr/share/man/man3/Devel::Timer.3pm.gz

 
ICM