Benchmark::Timer::Class - Perl module for timing the execution of methods in a specified object
use Benchmark::Timer::Class; use The_Real_Module; $obj = new The_Real_Module(); $th = new Benchmark::Timer::Class($obj); $th->method1_name_from_real_module(); $th->method2_name_from_real_module(); $th->method1_name_from_real_module(); $th->report();
The Benchmark::Timer::Class enables you to determine elapsed times for calls to methods of a specified object during normal running of your program with minimal amount of editing.
Takes an object reference and returns a reference to a Benchmark::Timer::Class object
Outputs a timing report to STDERR
Returns the mean time for all calls to method $methodname.
Returns the timing data as a hash keyed on object method names.
When called with an $methodname returns the raw timing data as an array. When called with no arguments returns the raw timing data as hash keyed on object method names, where the values of the hash are lists of timings for calls to that object method.
D. Neil, <perl@dougneil.co.uk>
Time::HiRes, Benchmark::Timer
Copyright(c) 2001 Doug Neil.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Benchmark::Timer::Class, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Benchmark::Timer::Class
CPAN shell
perl -MCPAN -e shell install Benchmark::Timer::Class
For more information on module installation, please visit the detailed CPAN module installation guide.