Filename | /home/s1/perl5/perlbrew/perls/perl-5.22.1/lib/site_perl/5.22.1/x86_64-linux/Params/Validate/XS.pm |
Statements | Executed 7015 statements in 81.9ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
22002 | 5 | 2 | 542ms | 795ms | validate (xsub) | Params::Validate::XS::
7000 | 2 | 1 | 46.2ms | 66.9ms | _check_regex_from_xs | Params::Validate::XS::
7000 | 1 | 1 | 12.7ms | 12.7ms | CORE:match (opcode) | Params::Validate::XS::
7000 | 1 | 1 | 7.91ms | 7.91ms | CORE:regcomp (opcode) | Params::Validate::XS::
1 | 1 | 1 | 33µs | 37µs | BEGIN@3 | Params::Validate::XS::
2 | 1 | 1 | 23µs | 23µs | validate_pos (xsub) | Params::Validate::XS::
1 | 1 | 1 | 11µs | 19µs | BEGIN@4 | Params::Validate::XS::
1 | 1 | 1 | 11µs | 63µs | BEGIN@8 | Params::Validate::XS::
1 | 1 | 1 | 8µs | 8µs | BEGIN@38 | Params::Validate::XS::
0 | 0 | 0 | 0s | 0s | __ANON__[:12] | Params::Validate::XS::
0 | 0 | 0 | 0s | 0s | validation_options | Params::Validate::XS::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Params::Validate::XS; | ||||
2 | |||||
3 | 2 | 42µs | 2 | 42µs | # spent 37µs (33+5) within Params::Validate::XS::BEGIN@3 which was called:
# once (33µs+5µs) by Module::Runtime::require_module at line 3 # spent 37µs making 1 call to Params::Validate::XS::BEGIN@3
# spent 5µs making 1 call to strict::import |
4 | 2 | 52µs | 2 | 26µs | # spent 19µs (11+8) within Params::Validate::XS::BEGIN@4 which was called:
# once (11µs+8µs) by Module::Runtime::require_module at line 4 # spent 19µs making 1 call to Params::Validate::XS::BEGIN@4
# spent 8µs making 1 call to warnings::import |
5 | |||||
6 | 1 | 600ns | our $VERSION = '1.24'; | ||
7 | |||||
8 | 2 | 215µs | 2 | 115µs | # spent 63µs (11+52) within Params::Validate::XS::BEGIN@8 which was called:
# once (11µs+52µs) by Module::Runtime::require_module at line 8 # spent 63µs making 1 call to Params::Validate::XS::BEGIN@8
# spent 52µs making 1 call to Exporter::import |
9 | |||||
10 | my $default_fail = sub { | ||||
11 | Carp::confess( $_[0] ); | ||||
12 | 1 | 3µs | }; | ||
13 | |||||
14 | { | ||||
15 | 2 | 8µs | my %defaults = ( | ||
16 | ignore_case => 0, | ||||
17 | strip_leading => 0, | ||||
18 | allow_extra => 0, | ||||
19 | on_fail => $default_fail, | ||||
20 | stack_skip => 1, | ||||
21 | normalize_keys => undef, | ||||
22 | ); | ||||
23 | |||||
24 | 1 | 2µs | *set_options = \&validation_options; | ||
25 | |||||
26 | sub validation_options { | ||||
27 | my %opts = @_; | ||||
28 | |||||
29 | my $caller = caller; | ||||
30 | |||||
31 | foreach ( keys %defaults ) { | ||||
32 | $opts{$_} = $defaults{$_} unless exists $opts{$_}; | ||||
33 | } | ||||
34 | |||||
35 | $Params::Validate::OPTIONS{$caller} = \%opts; | ||||
36 | } | ||||
37 | |||||
38 | 2 | 129µs | 1 | 8µs | # spent 8µs within Params::Validate::XS::BEGIN@38 which was called:
# once (8µs+0s) by Module::Runtime::require_module at line 38 # spent 8µs making 1 call to Params::Validate::XS::BEGIN@38 |
39 | XSLoader::load( | ||||
40 | __PACKAGE__, | ||||
41 | exists $Params::Validate::XS::{VERSION} | ||||
42 | 1 | 367µs | 1 | 357µs | ? ${ $Params::Validate::XS::{VERSION} } # spent 357µs making 1 call to XSLoader::load |
43 | : (), | ||||
44 | ); | ||||
45 | } | ||||
46 | |||||
47 | # spent 66.9ms (46.2+20.6) within Params::Validate::XS::_check_regex_from_xs which was called 7000 times, avg 10µs/call:
# 4000 times (31.7ms+10.8ms) by Params::Validate::XS::validate at line 2009 of DateTime.pm, avg 11µs/call
# 3000 times (14.6ms+9.82ms) by Params::Validate::XS::validate at line 497 of DateTime.pm, avg 8µs/call | ||||
48 | 7000 | 81.1ms | 14000 | 20.6ms | return ( defined $_[0] ? $_[0] : '' ) =~ /$_[1]/ ? 1 : 0; # spent 12.7ms making 7000 calls to Params::Validate::XS::CORE:match, avg 2µs/call
# spent 7.91ms making 7000 calls to Params::Validate::XS::CORE:regcomp, avg 1µs/call |
49 | } | ||||
50 | |||||
51 | 1 | 13µs | 1; | ||
# spent 12.7ms within Params::Validate::XS::CORE:match which was called 7000 times, avg 2µs/call:
# 7000 times (12.7ms+0s) by Params::Validate::XS::_check_regex_from_xs at line 48, avg 2µs/call | |||||
# spent 7.91ms within Params::Validate::XS::CORE:regcomp which was called 7000 times, avg 1µs/call:
# 7000 times (7.91ms+0s) by Params::Validate::XS::_check_regex_from_xs at line 48, avg 1µs/call | |||||
# spent 795ms (542+252) within Params::Validate::XS::validate which was called 22002 times, avg 36µs/call:
# 6000 times (357ms+158ms) by DateTime::new at line 197 of DateTime.pm, avg 86µs/call
# 6000 times (92.2ms+27.4ms) by DateTime::set at line 1954 of DateTime.pm, avg 20µs/call
# 4000 times (42.0ms+42.5ms) by DateTime::truncate at line 2009 of DateTime.pm, avg 21µs/call
# 3002 times (17.7ms+0s) by DateTime::TimeZone::new at line 35 of DateTime/TimeZone.pm, avg 6µs/call
# 3000 times (32.9ms+24.4ms) by DateTime::from_epoch at line 497 of DateTime.pm, avg 19µs/call | |||||
# spent 23µs within Params::Validate::XS::validate_pos which was called 2 times, avg 12µs/call:
# 2 times (23µs+0s) by DateTime::Locale::load at line 191 of DateTime/Locale.pm, avg 12µs/call |