Bencher-Scenarios-ShellGuess
view release on metacpan or search on metacpan
lib/Bencher/Scenario/ShellGuess/Overhead.pm view on Meta::CPAN
package Bencher::Scenario::ShellGuess::Overhead;
our $DATE = '2021-07-31'; # DATE
our $VERSION = '0.003'; # VERSION
use 5.010001;
use strict;
use warnings;
our $scenario = {
summary => 'Benchmark the startup overhead of guessing shell',
participants => [
{
name => 'load Shell::Guess',
perl_cmdline => ['-MShell::Guess', '-e1'],
},
{
name => 'load Shell::Guess + running_shell',
perl_cmdline => ['-MShell::Guess', '-e', '$sh = Shell::Guess->running_shell'],
},
{
name => 'perl (baseline)',
perl_cmdline => ['-e1'],
},
],
};
1;
# ABSTRACT: Benchmark the startup overhead of guessing shell
__END__
=pod
=encoding UTF-8
=head1 NAME
Bencher::Scenario::ShellGuess::Overhead - Benchmark the startup overhead of guessing shell
=head1 VERSION
This document describes version 0.003 of Bencher::Scenario::ShellGuess::Overhead (from Perl distribution Bencher-Scenarios-ShellGuess), released on 2021-07-31.
=head1 SYNOPSIS
To run benchmark with default option:
% bencher -m ShellGuess::Overhead
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see L<bencher> or run C<bencher --help>.
=head1 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 L<Bencher> and L<bencher> (CLI) for more de...
=head1 BENCHMARK PARTICIPANTS
=over
=item * load Shell::Guess (command)
=item * load Shell::Guess + running_shell (command)
=item * perl (baseline) (command)
=back
=head1 BENCHMARK SAMPLE RESULTS
=head2 Sample benchmark #1
Run on: perl: I<< v5.24.0 >>, CPU: I<< Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz (4 cores) >>, OS: I<< GNU/Linux Debian version 8.0 >>, OS kernel: I<< Linux version 3.16.0-4-amd64 >>.
Benchmark command (under bash):
%
Result formatted as table:
#table1#
+-----------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
| participant | rate (/s) | time (ms) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples |
+-----------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
| load Shell::Guess + running_shell | 98 | 10 | 0 | 3.74052667964341 | 3.8e-05 | 21 |
| load Shell::Guess | 100 | 9.7 | 0.0517047248148278 | 3.50746922381476 | 3e-05 | 20 |
| perl (baseline) | 460 | 2.2 | 3.74052667964341 | 0 | 1.1e-05 | 20 |
+-----------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
The above result formatted in L<Benchmark.pm|Benchmark> style:
Rate load Shell::Guess + running_shell load Shell::Guess perl (baseline)
( run in 2.180 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )