Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37400679
en ru br
ALT Linux repos
S:2.02-alt3
5.0: 2.02-alt1.1

Group :: Development/Perl
RPM: perl-Devel-SmallProf

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#
#   - Devel::SmallProf -
#   This spec file was automatically generated by cpan2rpm [ver: 2.027]
#   (ALT Linux revision)
#   The following arguments were used:
#       Devel::SmallProf
#   For more information on cpan2rpm please visit: http://perl.arix.com/
#

%define module Devel-SmallProf
%define m_distro Devel-SmallProf
%define m_name Devel::SmallProf
%define m_author_id SALVA
%define _enable_test 1

Name: perl-Devel-SmallProf
Version: 2.02
Release: alt3

Summary: per-line Perl profiler

License: Artistic
Group: Development/Perl
Url: http://search.cpan.org/dist/Devel-SmallProf/

Packager: Michael Bochkaryov <misha at altlinux.ru>

BuildArch: noarch
Source: http://search.cpan.org//CPAN/authors/id/S/SA/SALVA/%m_distro-%version.tar.gz
Patch: Devel-SmallProf-2.02-alt-perl522.patch
Patch1: 0001-Remove-DB-sub-declaration.patch

# Automatically added by buildreq on Wed Apr 09 2008

BuildRequires: perl-devel

%description
The Devel::SmallProf profiler is focused on the time taken for a program run on
a line-by-line basis.  It is intended to be as "small" in terms of impact on
the speed and memory usage of the profiled program as possible and also in
terms of being simple to use.  Those statistics are placed in the file
smallprof.out in the following format:

       <num> <time> <ctime> <line>:<text>

where <num> is the number of times that the line was executed, <time> is the
amount of "wall time" (time according the the clock on the wall vs. cpu time)
spent executing it, <ctime> is the amount of cpu time expended on it and <line>
and <text> are the line number and the actual text of the executed line (read
from the file).

The package uses the debugging hooks in Perl and thus needs the -d switch,
so to profile test.pl, use the command:

perl5 -d:SmallProf test.pl

Once the script is done, the statistics in smallprof.out can be sorted to
show which lines took the most time.  The output can be sorted to find which
lines take the longest, either with the sort command:

sort -k 2nr,2 smallprof.out | less

or a perl script:

open(PROF,"smallprof.out");
at sorted = sort {(split(/\s+/,$b))[2] <=>
                       (split(/\s+/,$a))[2]} <PROF>;
       close PROF;
print join('', at sorted);

%prep
%setup -q -n %m_distro-%version
%patch0 -p1
%patch1 -p1

%build
%perl_vendor_build

%install
%perl_vendor_install

%files
%perl_vendor_privlib/*
%exclude %perl_vendor_archlib

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin