Bencher-Scenario-AcmePERLANCARTestPerformance

 view release on metacpan or  search on metacpan

lib/Bencher/Scenario/AcmePERLANCARTestPerformance.pm  view on Meta::CPAN

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 BENCHMARKED MODULES

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

L<Acme::PERLANCAR::Test::Performance> 0.06

=head1 BENCHMARK PARTICIPANTS

=over

=item * Acme::PERLANCAR::Test::Performance::primes (perl_code)

Function call template:

 Acme::PERLANCAR::Test::Performance::primes(<num>)



=back

=head1 BENCHMARK DATASETS

=over

=item * 100

=back

=head1 BENCHMARK SAMPLE RESULTS

=head2 Sample benchmark #1

Run on: perl: I<< v5.34.0 >>, CPU: I<< Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (4 cores) >>, OS: I<< GNU/Linux LinuxMint version 19 >>, OS kernel: I<< Linux version 5.3.0-68-generic >>.

Benchmark command:

 % bencher -m AcmePERLANCARTestPerformance --include-path /home/s1/repos/perl-Acme-PERLANCAR-Test-Performance/archive/0.01 --include-path /home/s1/repos/perl-Acme-PERLANCAR-Test-Performance/archive/0.02 --include-path /home/s1/repos/perl-Acme-PERLANC...

Result formatted as table:

 #table1#
 | participant                                | dataset | perl | modver | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples | ds_tags | p_tags |
 |--------------------------------------------+---------+------+--------+-----------+-----------+-----------------------+-----------------------+---------+---------+---------+--------|
 | Acme::PERLANCAR::Test::Performance::primes | 100     | perl | 0.06   |    108000 |      9.24 |                 0.00% |                 0.00% | 3.3e-09 |      20 |         |        |


The above result formatted in L<Benchmark.pm|Benchmark> style:

         Rate     
     108000/s  -- 
 
 Legends:
   : dataset=100 ds_tags= modver=0.06 p_tags= participant=Acme::PERLANCAR::Test::Performance::primes perl=perl

The above result presented as chart:

=begin html

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAH4CAMAAABUnipoAAAJJmlDQ1BpY2MAAEiJlZVnUJNZF8fv8zzphUASQodQQ5EqJYCUEFoo0quoQOidUEVsiLgCK4qINEWQRQEXXJUia0UUC4uCAhZ0gywCyrpxFVFBWXDfGZ33HT+8/5l7z2/+c+bec8/5cAEgiINlwct7YlK6wNvJjhkYFMwE3yiMn5...

=end html


=head2 Sample benchmark #2

Benchmark command:

 % bencher -m AcmePERLANCARTestPerformance --include-path /home/s1/repos/perl-Acme-PERLANCAR-Test-Performance/archive/0.01 --include-path /home/s1/repos/perl-Acme-PERLANCAR-Test-Performance/archive/0.02 --include-path /home/s1/repos/perl-Acme-PERLANC...

Result formatted as table:

 #table2#
 | participant                        | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors  | samples |
 |------------------------------------+-----------+-------------------+-----------------------+-----------------------+----------+---------|
 | Acme::PERLANCAR::Test::Performance |       5.5 |               3.5 |                 0.00% |               166.32% | 4.8e-05  |      20 |
 | perl -e1 (baseline)                |       2   |               0   |               166.32% |                 0.00% |   0.0001 |      33 |


The above result formatted in L<Benchmark.pm|Benchmark> style:

                          Rate  APT:P  perl -e1 (baseline) 
  APT:P                181.8/s     --                 -63% 
  perl -e1 (baseline)  500.0/s   175%                   -- 
 
 Legends:
   APT:P: mod_overhead_time=3.5 participant=Acme::PERLANCAR::Test::Performance
   perl -e1 (baseline): mod_overhead_time=0 participant=perl -e1 (baseline)

The above result presented as chart:

=begin html

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAH4CAMAAABUnipoAAAJJmlDQ1BpY2MAAEiJlZVnUJNZF8fv8zzphUASQodQQ5EqJYCUEFoo0quoQOidUEVsiLgCK4qINEWQRQEXXJUia0UUC4uCAhZ0gywCyrpxFVFBWXDfGZ33HT+8/5l7z2/+c+bec8/5cAEgiINlwct7YlK6wNvJjhkYFMwE3yiMn5...

=end html


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

=head1 CONTRIBUTOR

=for stopwords perlancar (on netbook-zenbook-ux305)

perlancar (on netbook-zenbook-ux305) <perlancar@gmail.com>

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/Bencher-Scenario-AcmePERLANCARTestPerformance>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-Bencher-Scenario-AcmePERLANCARTestPerformance>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenario-AcmePERLANCARTestPerformance>

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.

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 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.

=cut



( run in 2.719 seconds using v1.01-cache-2.11-cpan-df04353d9ac )