Scenario/Data/Sah/Resolve/Overhead.pm

filter: Statementstmt 100% 26 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 33 / 33 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary Scenario/Data/Sah/Resolve/Resolve.pm »
1 package Bencher::Scenario::Data::Sah::Resolve::Overhead;
2  
3 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Sah::Schema::perl::distname; # to pull dependency
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Sah::Schema::perl::modname; # to pull dependency
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Sah::Schema::poseven; # to pull dependency
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Sah::Schema::posint; # to pull dependency
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
13 1 our $DATE = '2023-01-19'; # DATE
14 1 our $DIST = 'Bencher-Scenarios-Data-Sah-Resolve'; # DIST
15 1 our $VERSION = '0.005'; # VERSION
16  
17 1 our $scenario = {
18 summary => 'Benchmark the overhead of resolving schemas',
19 modules => {
20 'Data::Sah' => {},
21 'Data::Sah::Normalize' => {},
22 'Data::Sah::Resolve' => {},
23 },
24 participants => [
25 {
26 name => 'resolve_schema',
27 perl_cmdline_template => ["-MData::Sah::Resolve=resolve_schema", "-e", 'for (@{ <schemas> }) { resolve_schema($_) }'],
28 },
29 {
30 name => 'normalize_schema',
31 perl_cmdline_template => ["-MData::Sah::Normalize=normalize_schema", "-e", 'for (@{ <schemas> }) { normalize_schema($_) }'],
32 },
33 {
34 name => 'gen_validator',
35 perl_cmdline_template => ["-MData::Sah=gen_validator", "-e", 'for (@{ <schemas> }) { gen_validator($_, {return_type=>q(str)}) }'],
36 },
37 ],
38  
39 datasets => [
40 {name=>"int" , args=>{schemas=>'[q(int)]'}},
41 {name=>"perl::modname" , args=>{schemas=>'[q(perl::modname)]'}},
42 {name=>"5-schemas" , args=>{schemas=>'[q(int),q(perl::distname),q(perl::modname),q(posint),q(poseven)]'}},
43 ],
44 };
45  
46 1 1;
47 # ABSTRACT: Benchmark the overhead of resolving schemas
48  
49 __END__
↑ Summary Scenario/Data/Sah/Resolve/Resolve.pm »