++ed by:

1 PAUSE user
1 non-PAUSE user.

Steffen Schwigon


benchmark-perlformance - Frontend for Benchmark::Perl::Formance



  $ benchmark-perlformance
  $ benchmark-perlformance --plugins=SpamAssassin,Fib,Rx
  $ benchmark-perlformance --plugins=SpamAssassin,Fib,Rx -q
  $ benchmark-perlformance --plugins=SpamAssassin,Fib,Rx -v
  $ benchmark-perlformance --plugins=SpamAssassin,Fib,Rx -vv -ccccc

To provide configuration, general and plugin specific, you can use the -D option to define key/value pairs:

  $ benchmark-perlformance -DShootout_fasta_n=5500  [...]

Plugins usually follow the convention that the options are prefixed with the plugin name, like in the example it means the config value n used by the plugin Shootout::fasta.


This is the frontend commandline tool for starting the performance benchmark runs.

After running it prints out the results which you can take to compare them to runs with other Perl versions, other architectures, different compile time configuration or on different machines.


There are some options available.


prints out a help page.


Use only a particular list of sub benchmarks. The comma-separated list refers to Benchmark::Perl::Formance::Plugin::* respectively.

If you provide --plugins=ALL then all known plugins will be tried.

If you do not provide the --plugins option then a default list of "mostly harmless" plugins is used which should work with the same dependencies of Benchmark::Perl::Formance itself (currently: DPath, Fib, FibOO, Mem, Prime, Rx, Shootout::{fasta, regexdna, binarytrees, revcomp, nbody, spectralnorm}).


This activates a condensed tabular output. Default since v0.10.


This activates JSON formatted output containing meta information.


This activates YAML formatted output containing meta information.


Similar to --outstyle=yaml, except the produced YAML is actually the lightweight variant YAMLish produced by Data::YAML::Writer, which can easily be embedded into TAP.


This option produces benchmarks result entries following the BenchmarkAnything::Schema.

Implicitely enables --outstyle=json (unless you specify --outstyle=yaml/yamlish), -cccc (extensive config info), -p (platform info).


This reports the results to a BenchmarkAnything store, as configured in your BenchmarkAnything config ($BENCHMARKANYTHING_CONFIGFILE or ~/.benchmarkanything.cfg).

Implicitely enables --benchmarkanything, --outstyle=json, -cccc (extensive config info), -p (platform info).


Write results into FILE. If FILE can not be opened then it prints to STDOUT.


If this is set then some plugins try to scale down the stress to take less time (with less useful results, of course). Mostly for easier development.


Runs an external utility script (benchmark-perlformance-set-stable-system) which stabilizes the system to get less deviation on multiple runs.

The system is stabilized using:

The external utility script is called via sudo - please configure your sudo in advance to suit your needs, e.g. to not ask for password. An alternative approach is to run benchmark-perlformance-set-stable-system lo once when your system boots, like from /etc/init.d/ (and run your cpu slow all the time, obviously).

Be careful: maybe the cpu is not restored perfectly after a run, e.g., due to crashes during the benchmarking, or the values are not the very same. This could make your next results without --stabilize-cpu inconclusive. Reboot your system to ensure a clean state or use --stabilize-cpu all the time.


Print Benchmark::Perl::Formance version. In conjunction with -v it prints out all available plugins with version.


Increases the verbosity level during the run of the benchmarks. Default is only print the result (and maybe some output from external tools).

To increase the number of keys from your Perl Config that are included in the result use one or more -c options.

Please note that only one single -v is not enough to see errors that occur when trying to load a plugin. They are only marked as "skipped". Use -vv to see the error message; -vvv for progress information; -vvvv or more should be used for debugging info.


Be quiet; do not output results.


Gives you the most basic information like Perl version, operating system name and architecture, i.e., perlpath, version, archname, archname64, osvers.


Adds gccversion, gnulibc_version, usemymalloc, config_args, optimize.


Adds ccflags, ccname, cccdlflags, ccdlflags, cppflags, nm_so_opt.


Adds about 40 more keys from Perl's %Config hash - everything that sounds like it could either influence performance between different hardware, configurations, and compilers, or interesting meta information around that.


Includes all info from Perl's %Config hash.


Includes platform info via Devel::Platform::Info

(Users who want to greet the 80s combine it this way: -cccp. :-))

--tapdescription="some description"

When given together with --outstyle=yamlish this will prepend the YAMLish with a TAP line

  ok some description

This makes it easier for wrappers to embed the output into TAP which otherwise need to differentiate between output (verbose and other) and the YAMLish.


This indents the output of --outstyle=yamlish by some spaces (2 in the example). Together with --tapdescription it makes an TAP v13 style structured diagnostics block which can, for instance, be evaluated using TAP::DOM.


By setting this you can activate the forks drop-in replacement for threads.

See Benchmark::Perl::Formance::Plugin::Threads.


With this you can configure some plugins by defining key/value pairs.


There are some options available.


See Benchmark::Perl::Formance::Plugin::SpamAssassin. Contains the path to the "sa-learn" executable.


See Benchmark::Perl::Formance::Plugin::Threads. Use this many count of threads. Default is 16.


Please read the documentation for the used plugins, as they might accept special configuration, usually via -Dkey=value options.


Macro benchmark. Run sa-learn learning tool from SpamAssassin, which stresses string, regex and data structures operations.


Micro benchmarks. Stress memory operations.


Micro benchmarks. Prime numbers.


Macro benchmark. Use DPath to stress lookup, traversing and copying data structures.


Micro benchmarks. Regular expressions, basic functions and pathological regex stressing.


Micro benchmarks. Compare differnet regex engines (pluggable since Perl 5.10).


Micro benchmarks. Stress regexes by running the Regexp::Common testsuite.


Micro benchmarks. Pure Perl matrix operations.


Micro benchmarks. Fibonnacci numbers to stress recursion and function calls.


Micro benchmarks. Fibonnacci numbers to stress recursion and method calls, with plain Perl OO.


Micro benchmarks. Fibonnacci numbers to stress recursion and method calls, with plain Perl OO using 5.20 signatures.


Micro benchmarks. Fibonnacci numbers to stress recursion and method calls, with Moose.


Micro benchmarks. Fibonnacci numbers to stress recursion and method calls, with Mouse.


Micro benchmarks. Fibonnacci numbers to stress recursion and method calls, with MooseX::Declare.


Micro benchmarks. Stress thread handling.


Micro benchmarks. Stress thread handling with shared variables.


Macro benchmarks. Run PerlCritic on itself.


Micro benchmarks. Runs some Perl benchmarks from the Language Shootout on alioth.debian.org.


Macro benchmarks. Stress using Perl6/Perl5 tools around Perl6 STD.pm.


Steffen Schwigon <ss5@renormalist.net>


This software is copyright (c) 2015 by Steffen Schwigon.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.