DevelOpProf
view release on metacpan or search on metacpan
This should be unimportant if the code being profiled is non-trivial.
=head1 AUTHOR
Malcolm Beattie, mbeattie@sable.ox.ac.uk.
=cut
use Exporter ();
use DynaLoader ();
use Opcode qw(opset_to_ops full_opset opdesc);
@ISA = qw(Exporter DynaLoader);
@EXPORT_OK = qw(profile op_count stats print_stats zero_stats);
$VERSION = "0.1";
my @opdescs = opdesc(opset_to_ops(full_opset));
sub stats {
my @counts = op_count();
my %stats;
foreach my $opdesc (@opdescs) {
$stats{$opdesc} = shift @counts;
}
return \%stats;
}
( run in 0.971 second using v1.01-cache-2.11-cpan-71847e10f99 )