NAME

Bencher::Scenario::Z::Overhead - Measure startup overhead of Z

VERSION

This document describes version 0.001 of Bencher::Scenario::Z::Overhead (from Perl distribution Bencher-Scenarios-Z), released on 2020-09-21.

SYNOPSIS

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.

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.

BENCHMARK PARTICIPANTS

  • use Z; (perl_code)

    Code template:

    use Z;
  • use Z -modern; (perl_code)

    Code template:

    use Z -modern;
  • use Z -compat; (perl_code)

    Code template:

    use Z -compat;
  • use Z -detect; (perl_code)

    Code template:

    use Z -detect;

SAMPLE BENCHMARK RESULTS

Run on: perl: v5.30.2, CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (4 cores), OS: GNU/Linux LinuxMint version 19, OS kernel: Linux version 4.15.0-91-generic.

Benchmark with bencher -m Z::Overhead --include-path archive/Z-0.001/lib --include-path archive/Z-0.005/lib --multimodver Z:

#table1#
+---------------------+--------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+
| participant         | modver | time (ms) | code_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors   | samples |
+---------------------+--------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+
| use Z;              | 0.005  |        84 |                 82 |                 0.00% |              4420.17% |   0.00026 |      20 |
| use Z -modern;      | 0.005  |        84 |                 82 |                 0.41% |              4401.81% |   0.0001  |      20 |
| use Z -detect;      | 0.005  |        84 |                 82 |                 0.43% |              4401.03% |   0.00014 |      20 |
| use Z;              | 0.001  |        84 |                 82 |                 0.71% |              4388.14% |   0.00016 |      20 |
| use Z -compat;      | 0.005  |        84 |                 82 |                 0.75% |              4386.44% |   0.00012 |      21 |
| use Z -modern;      | 0.001  |        84 |                 82 |                 0.94% |              4378.28% |   0.00017 |      20 |
| use Z -detect;      | 0.001  |        84 |                 82 |                 1.05% |              4373.31% |   0.0001  |      20 |
| use Z -compat;      | 0.001  |        83 |                 81 |                 1.37% |              4359.20% |   0.00012 |      21 |
| perl -e1 (baseline) | 0.001  |         2 |                  0 |              4277.17% |                 3.27% | 8.4e-05   |      21 |
| perl -e1 (baseline) | 0.005  |         2 |                  0 |              4420.17% |                 0.00% | 5.8e-05   |      20 |
+---------------------+--------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+

To display as an interactive HTML table on a browser, you can add option --format html+datatables.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenarios-Z.

SOURCE

Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-Z.

BUGS

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.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

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.