NAME
Bencher::Scenario::CmdLineParsingModules - Benchmark command-line parsing modules
VERSION
This document describes version 0.04 of Bencher::Scenario::CmdLineParsingModules (from Perl distribution Bencher-Scenario-CmdLineParsingModules), released on 2016-06-26.
SYNOPSIS
To run benchmark with default option:
% bencher -m CmdLineParsingModules
To run module startup overhead benchmark:
% bencher --module-startup -m CmdLineParsingModules
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run bencher --help
.
BENCHMARKED MODULES
Version numbers shown below are the versions used when running the sample benchmark.
Complete::Bash 0.27
Parse::CommandLine 0.02
BENCHMARK PARTICIPANTS
Parse::CommandLine::parse_command_line (perl_code)
Function call template:
Parse::CommandLine::parse_command_line(<cmdline>)
Complete::Bash::parse_cmdline (perl_code)
Function call template:
Complete::Bash::parse_cmdline(<cmdline>, 0)
BENCHMARK DATASETS
empty
cmd-only
2args-simple
4args
SAMPLE BENCHMARK RESULTS
Run on: perl: v5.22.2, CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (4 cores), OS: GNU/Linux Debian version 8.0, OS kernel: Linux version 3.16.0-4-amd64.
Benchmark with default options (bencher -m CmdLineParsingModules
):
+----------------------------------------+--------------+-----------+-----------+------------+---------+---------+
| participant | dataset | rate (/s) | time (μs) | vs_slowest | errors | samples |
+----------------------------------------+--------------+-----------+-----------+------------+---------+---------+
| Parse::CommandLine::parse_command_line | 4args | 42900 | 23.3 | 1 | 6.4e-09 | 22 |
| Complete::Bash::parse_cmdline | 4args | 49000 | 20.4 | 1.14 | 6.5e-09 | 21 |
| Complete::Bash::parse_cmdline | 2args-simple | 117160 | 8.5353 | 2.7292 | 4.7e-11 | 23 |
| Parse::CommandLine::parse_command_line | 2args-simple | 168000 | 5.95 | 3.92 | 1.5e-09 | 24 |
| Complete::Bash::parse_cmdline | cmd-only | 272000 | 3.67 | 6.34 | 1.4e-09 | 27 |
| Parse::CommandLine::parse_command_line | cmd-only | 427079 | 2.34149 | 9.94879 | 0 | 21 |
| Complete::Bash::parse_cmdline | empty | 1500000 | 0.66 | 36 | 8.1e-10 | 21 |
| Parse::CommandLine::parse_command_line | empty | 2980000 | 0.335 | 69.5 | 1.6e-10 | 32 |
+----------------------------------------+--------------+-----------+-----------+------------+---------+---------+
Benchmark module startup overhead (bencher -m CmdLineParsingModules --module-startup
):
+---------------------+-----------+------------------------+------------+---------+---------+
| participant | time (ms) | mod_overhead_time (ms) | vs_slowest | errors | samples |
+---------------------+-----------+------------------------+------------+---------+---------+
| Parse::CommandLine | 5.8 | 3.2 | 1 | 5.4e-05 | 20 |
| Complete::Bash | 5.4 | 2.8 | 1.1 | 2.2e-05 | 21 |
| perl -e1 (baseline) | 2.6 | 0 | 2.2 | 1.5e-05 | 20 |
+---------------------+-----------+------------------------+------------+---------+---------+
DESCRIPTION
Packaging a benchmark script as a Bencher scenario makes it convenient to include/exclude/add participants/datasets (either via CLI or Perl code), send the result to a central repository, among others . See Bencher and bencher (CLI) for more details.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenario-CmdLineParsingModules.
SOURCE
Source repository is at https://github.com/perlancar/perl-Bencher-Scenario-CmdLineParsingModules.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenario-CmdLineParsingModules
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.