Bencher::Scenario::Z::Overhead - Measure startup overhead of Z
This document describes version 0.005 of Bencher::Scenario::Z::Overhead (from Perl distribution Bencher-Scenarios-Z), released on 2020-10-08.
To run benchmark with default option:
% bencher -m Z::Overhead
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run bencher --help.
bencher --help
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.
use Z; (perl_code)
Code template:
use Z;
use Z -modern; (perl_code)
use Z -modern;
use Z -compat; (perl_code)
use Z -compat;
use Z -detect; (perl_code)
use Z -detect;
use Type::Tiny; (perl_code)
use Type::Tiny;
use Types::Standard; (perl_code)
use Types::Standard;
use Zydeco; (perl_code)
use Zydeco;
use Zydeco::Lite; (perl_code)
use Zydeco::Lite;
use MooX::Press; (perl_code)
use MooX::Press;
use Moo; (perl_code)
use Moo;
use Moose; (perl_code)
use Moose;
Run on: perl: v5.30.0, CPU: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (2 cores), OS: GNU/Linux Ubuntu version 19.10, OS kernel: Linux version 5.3.0-64-generic.
Benchmark with default options (bencher -m Z::Overhead):
bencher -m Z::Overhead
#table1# +----------------------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+ | participant | time (ms) | code_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +----------------------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+ | use Zydeco; | 164 | 157.3 | 0.00% | 2338.27% | 0.00013 | 20 | | use Moose; | 140 | 133.3 | 19.30% | 1943.85% | 0.00022 | 20 | | use Z; | 120 | 113.3 | 35.02% | 1705.90% | 0.00021 | 20 | | use Z -modern; | 120 | 113.3 | 35.83% | 1695.06% | 0.00013 | 20 | | use Z -detect; | 120 | 113.3 | 36.25% | 1689.55% | 0.00017 | 20 | | use Z -compat; | 120 | 113.3 | 37.35% | 1675.24% | 8.9e-05 | 20 | | use MooX::Press; | 91 | 84.3 | 80.00% | 1254.63% | 0.00013 | 20 | | use Zydeco::Lite; | 75 | 68.3 | 117.93% | 1018.85% | 8.1e-05 | 20 | | use Types::Standard; | 44 | 37.3 | 271.61% | 556.13% | 5.6e-05 | 20 | | use Type::Tiny; | 18.3 | 11.6 | 798.93% | 171.24% | 1.3e-05 | 20 | | use Moo; | 18 | 11.3 | 809.10% | 168.21% | 2.5e-05 | 20 | | perl -e1 (baseline) | 6.7 | 0 | 2338.27% | 0.00% | 1.7e-05 | 20 | +----------------------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+
To display as an interactive HTML table on a browser, you can add option --format html+datatables.
--format html+datatables
Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenarios-Z.
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-Z.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-Z
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.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2020 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.
To install Bencher::Scenarios::Z, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bencher::Scenarios::Z
CPAN shell
perl -MCPAN -e shell install Bencher::Scenarios::Z
For more information on module installation, please visit the detailed CPAN module installation guide.