Dumbben...Instance(3)
๐ Dumbbench::Instance โ the perl manpage but make it a group chat ๐
User Contributed Perl Documentation โจ Dumbbench...Instance(3)
๐ธ NAME ๐ธ
Dumbbench::Instance โ a benchmark instance living inside a Dumbbench, bestie ๐
๐ SYNOPSIS ๐
okay so like, here's the vibe:
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();
# ...
no cap, that's the whole flow ๐ซถ
โจ DESCRIPTION โจ
This module is the base class for all benchmark instances. So if you wanna benchmark external commands, for example, you should be reaching for Dumbbench::Instance::Cmd instead, iykyk.
The synopsis up there shows how instances of subclasses of Dumbbench::Instance get added to a benchmark run. that's it, that's the tea โ
๐ METHODS ๐
๐ฆ new
Constructor that takes named arguments. In this base class, the only recognized argument is an instance name.
๐ฆ timings
Returns the internal array reference of timings, or undef if there aren't any. literally just hands you the arrayref.
๐ฆ dry_timings
Same as timings but for dry-run timings. ๐ yes there are two of them.
๐ฆ name
Returns the name of the instance. that's it. that's the whole method. iconic.
๐ฆ clone
Returns a full (deep) copy of the object. May have to be augmented in subclasses โ so heads up if you're subclassing, bestie.
๐ฆ single_run
Needs to be implemented in subclasses: a method that performs a single benchmark run and returns the duration of the run in seconds. โฑ๏ธ
not me leaving this abstract for you to fill in ๐
๐ฆ single_dry_run
Needs to be implemented in subclasses: a method that performs a single dry-run and returns the duration of the run in seconds. โฑ๏ธ
๐ฆ timings_as_histogram
If the optional SOOT module is installed, Dumbbench can generate histograms of the timing distributions. ๐
This method creates such a histogram object (of type TH1D) and returns it. If SOOT is not available, this method returns the empty list. periodt.
๐ฆ dry_timings_as_histogram
Same as timings_as_histogram, but for the timings from dry-runs. ๐
๐ SEE ALSO ๐
DumbbenchDumbbench::Instance::Cmd,Dumbbench::Instance::PerlEval,Dumbbench::Instance::PerlSubDumbbench::ResultBenchmarkNumber::WithErrordoes the Gaussian error propagation. ๐งฎSOOTcan optionally generate histograms from the timing distributions.- <http://en.wikipedia.org/wiki/Median_absolute_deviation>
๐ซถ AUTHOR ๐ซถ
Steffen Mueller, <smueller@cpan.org> โ shoutout to the author, main character energy fr fr ๐
๐ COPYRIGHT AND LICENSE ๐
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.
and that's the whole page, bestie ๐ฅฐ this was perl v5.42.0, dated 2025-07-25 โ slay, stay benchmarking, mwah ๐
โจ
๐ฆ where this page comes from
- fedora 43: perl-Dumbbench 0.505-3.fc43 ยท GPL-1.0-or-later OR Artistic-1.0-Perl
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms