NAME
Bencher::Scenario::DataSahResolve::Overhead - Benchmark the overhead of resolving schemas
VERSION
This document describes version 0.003 of Bencher::Scenario::DataSahResolve::Overhead (from Perl distribution Bencher-Scenarios-DataSahResolve), released on 2017-01-25.
SYNOPSIS
To run benchmark with default option:
% bencher -m DataSahResolve::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.
BENCHMARKED MODULES
Version numbers shown below are the versions used when running the sample benchmark.
Data::Sah 0.87
Data::Sah::Normalize 0.04
Data::Sah::Resolve 0.004
BENCHMARK PARTICIPANTS
resolve_schema (command)
Command line:
#TEMPLATE: #perl -MData::Sah::Resolve=resolve_schema -e for (@{ <schemas> }) { resolve_schema($_) }
normalize_schema (command)
Command line:
#TEMPLATE: #perl -MData::Sah::Normalize=normalize_schema -e for (@{ <schemas> }) { normalize_schema($_) }
gen_validator (command)
Command line:
#TEMPLATE: #perl -MData::Sah=gen_validator -e for (@{ <schemas> }) { gen_validator($_, {return_type=>q(str)}) }
BENCHMARK DATASETS
int
perl::modname
5-schemas
SAMPLE BENCHMARK RESULTS
Run on: perl: v5.24.0, CPU: Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz (2 cores), OS: GNU/Linux LinuxMint version 17.3, OS kernel: Linux version 3.19.0-32-generic.
Benchmark with default options (bencher -m DataSahResolve::Overhead
):
#table1#
+------------------+---------------+-----------+-----------+------------+-----------+---------+
| participant | dataset | rate (/s) | time (ms) | vs_slowest | errors | samples |
+------------------+---------------+-----------+-----------+------------+-----------+---------+
| gen_validator | 5-schemas | 15 | 69 | 1 | 9.5e-05 | 21 |
| gen_validator | perl::modname | 18 | 57 | 1.2 | 8e-05 | 20 |
| gen_validator | int | 18 | 54 | 1.3 | 0.00018 | 20 |
| resolve_schema | 5-schemas | 57 | 18 | 3.9 | 0.00011 | 20 |
| resolve_schema | perl::modname | 61 | 16 | 4.2 | 5.6e-05 | 20 |
| resolve_schema | int | 64 | 16 | 4.4 | 7.1e-05 | 20 |
| normalize_schema | 5-schemas | 110 | 9.3 | 7.4 | 4.8e-05 | 20 |
| normalize_schema | perl::modname | 110 | 9.2 | 7.5 | 3.4e-05 | 20 |
| normalize_schema | int | 110 | 9.2 | 7.5 | 4.5e-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-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) 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.