Bencher::Scenario::DataSahVSTypeTiny::Validate - Benchmark validation
This document describes version 0.001 of Bencher::Scenario::DataSahVSTypeTiny::Validate (from Perl distribution Bencher-Scenarios-DataSahVSTypeTiny), released on 2016-05-24.
To run benchmark with default option:
% bencher -m DataSahVSTypeTiny::Validate
To run module startup overhead benchmark:
% bencher --module-startup -m DataSahVSTypeTiny::Validate
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run bencher --help.
bencher --help
Version numbers shown below are the versions used when running the sample benchmark.
Data::Sah 0.78
dsah (perl_code) [dsah]
Code template:
state $v = Data::Sah::gen_validator(<schema>); $v->(<data>)
tt (perl_code) [tt]
state $v = <type:raw>; $v->check(<data>)
int(dsah)
int(tt)
array10(dsah)
array10(tt)
Run on: perl: v5.22.1, CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz (4 cores), OS: GNU/Linux Debian version 8.0, OS kernel: Linux version 3.16.0-4-amd64.
Benchmark with default options (bencher -m DataSahVSTypeTiny::Validate):
bencher -m DataSahVSTypeTiny::Validate
+-------------+---------------+----------+-----------+-----------+------------+---------+---------+ | participant | dataset | arg_data | rate (/s) | time (μs) | vs_slowest | errors | samples | +-------------+---------------+----------+-----------+-----------+------------+---------+---------+ | dsah | array10(dsah) | | 2.01e+05 | 4.98 | 1 | 1.5e-09 | 24 | | tt | array10(tt) | | 1.07e+06 | 0.931 | 5.36 | 4.5e-10 | 30 | | tt | int(tt) | a | 2.5e+06 | 0.41 | 12 | 3.5e-09 | 20 | | dsah | int(dsah) | 1 | 2.53e+06 | 0.395 | 12.6 | 4.6e-11 | 20 | | tt | int(tt) | 1 | 2.58e+06 | 0.387 | 12.9 | 1.9e-10 | 20 | | dsah | int(dsah) | a | 2.6e+06 | 0.38 | 13 | 6.3e-10 | 20 | | tt | int(tt) | | 2.8e+06 | 0.36 | 14 | 1.1e-09 | 20 | | dsah | int(dsah) | | 3.21e+06 | 0.312 | 16 | 2.4e-10 | 22 | +-------------+---------------+----------+-----------+-----------+------------+---------+---------+
Benchmark module startup overhead (bencher -m DataSahVSTypeTiny::Validate --module-startup):
bencher -m DataSahVSTypeTiny::Validate --module-startup
+---------------------+-----------+------------------------+------------+---------+---------+ | participant | time (ms) | mod_overhead_time (ms) | vs_slowest | errors | samples | +---------------------+-----------+------------------------+------------+---------+---------+ | Data::Sah | 12 | 7.4 | 1 | 2.4e-05 | 20 | | perl -e1 (baseline) | 4.6 | 0 | 2.6 | 4.4e-05 | 20 | +---------------------+-----------+------------------------+------------+---------+---------+
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.
Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenarios-DataSahVSTypeTiny.
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-DataSahVSTypeTiny.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-DataSahVSTypeTiny
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) 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.
To install Bencher::Scenarios::DataSahVSTypeTiny, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bencher::Scenarios::DataSahVSTypeTiny
CPAN shell
perl -MCPAN -e shell install Bencher::Scenarios::DataSahVSTypeTiny
For more information on module installation, please visit the detailed CPAN module installation guide.