1Dumbbench::Instance::PeUrsleErvaClo(n3t)ributed Perl DocDuummebnbteantciho:n:Instance::PerlEval(3)
2
3
4

NAME

6       Dumbbench::Instance::PerlEval - Benchmarks a string of Perl code
7

SYNOPSIS

9         use Dumbbench;
10
11         my $bench = Dumbbench->new(
12           target_rel_precision => 0.005, # seek ~0.5%
13           initial_runs         => 20,    # the higher the more reliable
14         );
15         $bench->add_instances(
16           Dumbbench::Instance::PerlEval->new(name => 'mauve', code => 'for(1..1e9){$i++}'),
17           # ... more things to benchmark ...
18         );
19         $bench->run();
20         # ...
21

DESCRIPTION

23       This class inherits from Dumbbench::Instance and implements
24       benchmarking of strings of Perl code using "eval """.
25

METHODS

27   new
28       Constructor that takes named arguments.
29
30       In addition to the properties of the base class, the
31       "Dumbbench::Instance::PerlEval" constructor requires a "code"
32       parameter. The "code" needs to be a string that is suitable for passing
33       repeatedly to string-"eval".
34
35       Optionally, you can provide a "dry_run_code" option.  It has the same
36       structure and purpose as the "code" option, but it is used for the dry-
37       runs. By default, a simple "eval" is used for this, so it's unlikely
38       you will need the dry-run unless you want to strip out the compile-time
39       overhead of your code.
40
41   code
42       Returns the code string that was set during construction.
43
44   dry_run_code
45       Returns the dry-run code string that was set during construction.
46

SEE ALSO

48       Dumbbench, Dumbbench::Instance, Dumbbench::Instance::Cmd,
49       Dumbbench::Result
50
51       Benchmark
52
53       Number::WithError does the Gaussian error propagation.
54
55       SOOT can optionally generate histograms from the timing distributions.
56
57       <http://en.wikipedia.org/wiki/Median_absolute_deviation>
58

AUTHOR

60       Steffen Mueller, <smueller@cpan.org>
61
63       Copyright (C) 2010 by Steffen Mueller
64
65       This library is free software; you can redistribute it and/or modify it
66       under the same terms as Perl itself, either Perl version 5.8.1 or, at
67       your option, any later version of Perl 5 you may have available.
68
69
70
71perl v5.32.0                      2020-07-28  Dumbbench::Instance::PerlEval(3)
Impressum