benchmark-perlformance - Frontend for Benchmark::Perl::Formance
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.
Usage:
$ 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
If run directly it uses the perl in your PATH:
$ /path/to/benchmark-perlformance
To use another Perl start it via
$ /other/path/to/bin/perl /path/to/benchmark-perlformance
To provide configuration, general and plugin specific, you can use the -D option to define key/value pairs:
-D
$ 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.
n
Shootout::fasta
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.
This enables a condensed tabular output instead of YAML. Default since v0.10.
This activates YAML formatted output.
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.
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.
perlpath
version
archname
archname64
osvers
adds gccversion, gnulibc_version, usemymalloc, config_args, optimize.
gccversion
gnulibc_version
usemymalloc
config_args
optimize
adds ccflags, cppflags, nm_so_opt.
ccflags
cppflags
nm_so_opt
currently does not increase information.
includes all info from Perls %Config hash.
includes platform info via Devel::Platform::Info
(Users who want to greet the 80s combine it this way: -cccp. :-)
-cccp
When given this will prepend the YAML 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 YAML.
By setting this you can activate the forks drop-in replacement for threads.
forks
See Benchmark::Perl::Formance::Plugin::Threads.
With this you can configure plugins by defining key/value pairs.
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 need special configuration, usually via environment variables.
SpamAssassin
Regular expressions
Fibonnacci numbers to stress recursion and function calls.
Fibonnacci numbers with Moose to stress recursion and method calls.
Fibonnacci numbers with Mouse to stress recursion and method calls.
Fibonnacci numbers with plain Perl OO to stress recursion and method calls.
Fibonnacci numbers with threads to stress thread handling.
Runs some Perl benchmarks from the Language Shootout on alioth.debian.org.
Runs part of the Moose testsuite.
To install Benchmark::Perl::Formance, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Benchmark::Perl::Formance
CPAN shell
perl -MCPAN -e shell install Benchmark::Perl::Formance
For more information on module installation, please visit the detailed CPAN module installation guide.