Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Devel::GraphVizProf 2.10

    Download button

    No screenshots available
    Downloads: 364  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.5/5)
    4 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ted Ashton | More programs
    Perl Artistic License / FREE
    May 24th, 2012, 12:46 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Devel::GraphVizProf description

    A per-line Perl profiler (with graph output).

    Devel::GraphVizProf is a per-line Perl profiler (with graph output).

    SYNOPSIS

    perl -d:GraphVizProf test.pl > test.dot
    dot -Tpng test.dot > test.png

    NOTE: This module is a hack of Devel::SmallProf by Ted Ashton. It has been modified by Leon Brocard to produce output for GraphViz, but otherwise the only thing I have done is change the name. I hope to get my patches put into the main Devel::SmallProf code eventually, or alternatively read the output of Devel::SmallProf. Anyway, the normal documentation, which you can probably ignore, follows.

    The Devel::GraphVizProf 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:GraphVizProf 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");
    @sorted = sort {(split(/s+/,$b))[2]
    (split(/s+/,$a))[2]} ;
    close PROF;
    print join('',@sorted);


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Perl profiler | graph output | Perl module | Perl | profiler | GraphViz

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM