Benchmark-Harness

 view release on metacpan or  search on metacpan

Harness/TraceHighRes.pm  view on Meta::CPAN

              ,'s' => $procInfo->{stime}
              ,'t' => (Time::HiRes::time() - $self->[HNDLR_HARNESS]->{_startTime})
              ,'u' => $procInfo->{utime}
              ,'x' => $procInfo->{time}/1000
            }
            ,@_
          );
      };
}
  return $self;
}


package Benchmark::Harness::Handler::TraceHighRes;
use base qw(Benchmark::Harness::Handler::Trace);
use Benchmark::Harness::Constants;
use Time::HiRes;

=pod

=head1 Benchmark::Harness::TraceHighRes

=head2 SYNOPSIS

(stay tuned . . . )

=head2 Impact


This produces a slightly larger XML report than the Trace harness, since HighRes times consume more digits than low-res ones.
This report will be about 20% larger than that of Trace.

=over 8

=item1 MSWin32

Approximately 0.8 millisecond per trace (mostly from *::Trace.pm).

=item1 Linux

=back

=cut

### ###########################################################################
sub reportTraceInfo {
  my $self = shift;

  Benchmark::Harness::Handler::Trace::reportTraceInfo($self,
              {
                't' => ( Time::HiRes::time() - $self->[HNDLR_HARNESS]->{_startTime} )
              }
              ,@_
          );
}

### ###########################################################################
# USAGE: Benchmark::TraceHighRes::OnSubEntry($harnessSubroutine, \@subrArguments )
sub OnSubEntry {
  my $self = shift;
  $self->reportTraceInfo();#(shift, caller(1));
  return @_; # return the input arguments unchanged.
}

### ###########################################################################
# USAGE: Benchmark::TraceHighRes::OnSubEntry($harnessSubroutine, \@subrReturn )
sub OnSubExit {
  my $self = shift;
  $self->reportTraceInfo();#(shift, caller(1));
  return @_; # return the input arguments unchanged.
}


### ###########################################################################

=head1 AUTHOR

Glenn Wood, <glennwood@cpan.org>

=head1 COPYRIGHT

Copyright (C) 2004 Glenn Wood. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

=cut

1;



( run in 1.838 second using v1.01-cache-2.11-cpan-5735350b133 )