Bencher::Scenario::LogGer::StringLevel - Benchmark string_level()
This document describes version 0.017 of Bencher::Scenario::LogGer::StringLevel (from Perl distribution Bencher-Scenarios-LogGer), released on 2021-01-31.
To run benchmark with default option:
% bencher -m LogGer::StringLevel
To run module startup overhead benchmark:
% bencher --module-startup -m LogGer::StringLevel
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.
Version numbers shown below are the versions used when running the sample benchmark.
Log::ger::Util 0.038
Log::ger::Util::string_level (perl_code)
Function call template:
Log::ger::Util::string_level(<level>)
10
warn
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 5.3.0-68-generic.
Benchmark with default options (bencher -m LogGer::StringLevel):
bencher -m LogGer::StringLevel
#table1# +---------+-----------+-----------+-----------------------+-----------------------+---------+---------+ | dataset | rate (/s) | time (ns) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +---------+-----------+-----------+-----------------------+-----------------------+---------+---------+ | 10 | 1100000 | 930 | 0.00% | 541.01% | 1.2e-09 | 20 | | warn | 6860000 | 146 | 541.01% | 0.00% | 5.2e-11 | 20 | +---------+-----------+-----------+-----------------------+-----------------------+---------+---------+
Benchmark module startup overhead (bencher -m LogGer::StringLevel --module-startup):
bencher -m LogGer::StringLevel --module-startup
#table2# +---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+ | participant | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+ | Log::ger::Util | 7.7 | 4.5 | 0.00% | 138.14% | 2.4e-05 | 21 | | perl -e1 (baseline) | 3.2 | 0 | 138.14% | 0.00% | 1.1e-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-LogGer.
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-LogGer.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-LogGer
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) 2021, 2020, 2018, 2017 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::LogGer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bencher::Scenarios::LogGer
CPAN shell
perl -MCPAN -e shell install Bencher::Scenarios::LogGer
For more information on module installation, please visit the detailed CPAN module installation guide.