The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Bencher::Scenario::DataSahResolve::Resolve - Benchmark resolving

VERSION

This document describes version 0.004 of Bencher::Scenario::DataSahResolve::Resolve (from Perl distribution Bencher-Scenarios-DataSahResolve), released on 2021-08-01.

SYNOPSIS

To run benchmark with default option:

 % bencher -m DataSahResolve::Resolve

To run module startup overhead benchmark:

 % bencher --module-startup -m DataSahResolve::Resolve

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.

BENCHMARKED MODULES

Version numbers shown below are the versions used when running the sample benchmark.

Data::Sah::Resolve 0.011

BENCHMARK PARTICIPANTS

  • Data::Sah::Resolve::resolve_schema (perl_code)

    Function call template:

     Data::Sah::Resolve::resolve_schema(<schema>)

BENCHMARK DATASETS

  • int

  • posint

  • poseven

BENCHMARK SAMPLE RESULTS

Sample benchmark #1

Run on: perl: v5.34.0, 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 command:

 % bencher -m DataSahResolve::Resolve --include-path archive/Data-Sah-Resolve-0.008/lib --include-path archive/Data-Sah-Resolve-0.011/lib --multimodver Data::Sah::Resolve

Result formatted as table:

 #table1#
 +---------+--------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | dataset | modver | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples |
 +---------+--------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | poseven | 0.011  |     20000 |      49   |                 0.00% |              1869.65% | 1.1e-07 |      20 |
 | poseven | 0.008  |     22000 |      44   |                10.77% |              1678.22% | 5.1e-08 |      22 |
 | posint  | 0.011  |     35000 |      28   |                73.03% |              1038.29% | 5.3e-08 |      20 |
 | posint  | 0.008  |     43000 |      23.3 |               111.78% |               830.03% | 6.7e-09 |      20 |
 | int     | 0.011  |    210000 |       4.9 |               915.20% |                94.02% | 4.9e-09 |      21 |
 | int     | 0.008  |    400000 |       2.5 |              1869.65% |                 0.00% | 4.2e-09 |      20 |
 +---------+--------+-----------+-----------+-----------------------+-----------------------+---------+---------+

The above result formatted in Benchmark.pm style:

               Rate  poseven  poseven  posint  posint   int   int 
  poseven   20000/s       --     -10%    -42%    -52%  -90%  -94% 
  poseven   22000/s      11%       --    -36%    -47%  -88%  -94% 
  posint    35000/s      75%      57%      --    -16%  -82%  -91% 
  posint    43000/s     110%      88%     20%      --  -78%  -89% 
  int      210000/s     900%     797%    471%    375%    --  -48% 
  int      400000/s    1860%    1660%   1019%    832%   96%    -- 
 
 Legends:
   int: dataset=int modver=0.008
   poseven: dataset=poseven modver=0.008
   posint: dataset=posint modver=0.008

The above result presented as chart:

Sample benchmark #2

Benchmark command (benchmarking module startup overhead):

 % bencher -m DataSahResolve::Resolve --module-startup

Result formatted as table:

 #table2#
 +---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
 | participant         | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples |
 +---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
 | Data::Sah::Resolve  |         8 |                 4 |                 0.00% |                73.07% | 0.00027 |      21 |
 | perl -e1 (baseline) |         4 |                 0 |                73.07% |                 0.00% | 0.00014 |      20 |
 +---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+

The above result formatted in Benchmark.pm style:

                          Rate  DS:R  perl -e1 (baseline) 
  DS:R                 125.0/s    --                 -50% 
  perl -e1 (baseline)  250.0/s  100%                   -- 
 
 Legends:
   DS:R: mod_overhead_time=4 participant=Data::Sah::Resolve
   perl -e1 (baseline): mod_overhead_time=0 participant=perl -e1 (baseline)

The above result presented as chart:

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-DataSahResolve.

SOURCE

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

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-DataSahResolve

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) 2021, 2017, 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.