Dumbbench::Instance - A benchmark instance within a Dumbbench
use Dumbbench; my $bench = Dumbbench->new( target_rel_precision => 0.005, # seek ~0.5% initial_runs => 20, # the higher the more reliable ); $bench->add_instances( Dumbbench::Instance::Cmd->new(name => 'mauve', command => [qw(perl -e 'something')]), # ... more things to benchmark ... ); $bench->run(); # ...
This module is the base class for all benchmark instances. For example, for benchmarking external commands, you should use Dumbbench::Instance::Cmd.
The synopsis shows how instances of subclasses of Dumbbench::Instance are added to a benchmark run.
Dumbbench::Instance
Constructor that takes named arguments. In this base class, the only recognized argument is an instance name.
name
Returns the internal array reference of timings or undef if there aren't any.
Same as timings but for dry-run timings.
timings
Returns the name of the instance.
Returns a full (deep) copy of the object. May have to be augmented in subclasses.
Needs to be implemented in subclasses: A method that performs a single benchmark run and returns the duration of the run in seconds.
Needs to be implemented in subclasses: A method that performs a single dry-run and returns the duration of the run in seconds.
If the optional SOOT module is installed, Dumbbench can generate histograms of the timing distributions.
Dumbbench
This method creates such a histogram object (of type TH1D) and returns it. If SOOT is not available, this method returns the empty list.
TH1D
SOOT
Same as timings_as_histogram, but for the timings from dry-runs.
timings_as_histogram
Dumbbench::Instance::Cmd, Dumbbench::Instance::PerlEval, Dumbbench::Instance::PerlSub
Dumbbench::Result
Benchmark
Number::WithError does the Gaussian error propagation.
SOOT can optionally generate histograms from the timing distributions.
http://en.wikipedia.org/wiki/Median_absolute_deviation
Steffen Mueller, <smueller@cpan.org>
Copyright (C) 2010 by Steffen Mueller
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available.
To install Dumbbench, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dumbbench
CPAN shell
perl -MCPAN -e shell install Dumbbench
For more information on module installation, please visit the detailed CPAN module installation guide.