Next Making Programs Faster 78

Devel::OurProf

        package Devel::OurProf;
        BEGIN { ($start_time) = times 
                open REPORT, ">", "ourprof.out" or die $! }
        sub DB::DB {
          my ($end_time) = times;
          my $elapsed = $end_time - $start_time;
          my ($package, $filename, $line) = caller(0);
          my $sub = (caller(1))[3];
          ($start_time) = times, return 
            unless $sub eq 'Pod::Parser::parse_text';
          $count[$line]++;
          $time[$line] += $elapsed;
          $total_time += $elapsed;
          ($start_time) = times;
        }
        ... continued ...

Next Copyright © 2003 M. J. Dominus