Bencher-Scenario-BagComparison
view release on metacpan or search on metacpan
lib/Bencher/Scenario/BagComparison.pm view on Meta::CPAN
Result formatted as table:
#table1#
| dataset | rate (/s) | time (ms) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples |
|--------------+-----------+-----------+-----------------------+-----------------------+---------+---------|
| elems=200num | 14.5 | 69 | 0.00% | 21844.48% | 4.7e-05 | 20 |
| elems=100num | 33 | 30 | 128.97% | 9483.95% | 4.1e-05 | 20 |
| elems=10num | 3200 | 0.31 | 21844.48% | 0.00% | 4.3e-07 | 20 |
The above result formatted in L<Benchmark.pm|Benchmark> style:
Rate elems=200num elems=100num elems=10num
elems=200num 14.5/s -- -56% -99%
elems=100num 33/s 129% -- -98%
elems=10num 3200/s 22158% 9577% --
Legends:
elems=100num: dataset=elems=100num
elems=10num: dataset=elems=10num
elems=200num: dataset=elems=200num
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 (benchmarking module startup overhead):
% bencher -m BagComparison --module-startup
Result formatted as table:
#table2#
| participant | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples |
|---------------------+-----------+-------------------+-----------------------+-----------------------+-----------+---------|
| Test::Deep | 45 | 40.1 | 0.00% | 817.50% | 0.00019 | 20 |
| perl -e1 (baseline) | 4.9 | 0 | 817.50% | 0.00% | 2.2e-05 | 21 |
The above result formatted in L<Benchmark.pm|Benchmark> style:
Rate T:D perl -e1 (baseline)
T:D 22.2/s -- -89%
perl -e1 (baseline) 204.1/s 818% --
Legends:
T:D: mod_overhead_time=40.1 participant=Test::Deep
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 (@pc-office)
perlancar (@pc-office) <perlancar@gmail.com>
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/Bencher-Scenario-BagComparison>.
=head1 SOURCE
Source repository is at L<https://github.com/perlancar/perl-Bencher-Scenario-BagComparison>.
=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-BagComparison>
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 SEE ALSO
L<Bencher::Scenario::SetComparison>
=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 0.477 second using v1.01-cache-2.11-cpan-e1769b4cff6 )