Profile of Params/Validate/XS.pm

← Index
NYTProf Performance Profile «line view»
For -e
Run on Thu Jun 30 16:34:56 2016
Reported on Thu Jun 30 16:35:09 2016

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 60.9ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
22002 | 5 | 2 | 511ms | 762ms | Params::Validate::XS::::validateParams::Validate::XS::validate (xsub)
7000 | 2 | 1 | 33.8ms | 53.7ms | Params::Validate::XS::::_check_regex_from_xsParams::Validate::XS::_check_regex_from_xs
7000 | 1 | 1 | 12.0ms | 12.0ms | Params::Validate::XS::::CORE:matchParams::Validate::XS::CORE:match (opcode)
7000 | 1 | 1 | 7.83ms | 7.83ms | Params::Validate::XS::::CORE:regcompParams::Validate::XS::CORE:regcomp (opcode)
1 | 1 | 1 | 16µs | 19µs | Params::Validate::XS::::BEGIN@3Params::Validate::XS::BEGIN@3
2 | 1 | 1 | 12µs | 12µs | Params::Validate::XS::::validate_posParams::Validate::XS::validate_pos (xsub)
1 | 1 | 1 | 8µs | 43µs | Params::Validate::XS::::BEGIN@8Params::Validate::XS::BEGIN@8
1 | 1 | 1 | 8µs | 12µs | Params::Validate::XS::::BEGIN@4Params::Validate::XS::BEGIN@4
1 | 1 | 1 | 5µs | 5µs | Params::Validate::XS::::BEGIN@38Params::Validate::XS::BEGIN@38
0 | 0 | 0 | 0s | 0s | Params::Validate::XS::::__ANON__[:12]Params::Validate::XS::__ANON__[:12]
0 | 0 | 0 | 0s | 0s | Params::Validate::XS::::validation_optionsParams::Validate::XS::validation_options

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package Params::Validate::XS;
2 |  |  |  |  |
3 | 2 | 29µs | 2 | 22µs | # spent 19µs (16+2) within Params::Validate::XS::BEGIN@3 which was called: # once (16µs+2µs) by Module::Runtime::require_module at line 3 use strict; # spent 19µs making 1 call to Params::Validate::XS::BEGIN@3 # spent 2µs making 1 call to strict::import
4 | 2 | 36µs | 2 | 17µs | # spent 12µs (8+5) within Params::Validate::XS::BEGIN@4 which was called: # once (8µs+5µs) by Module::Runtime::require_module at line 4 use warnings; # spent 12µs making 1 call to Params::Validate::XS::BEGIN@4 # spent 5µs making 1 call to warnings::import
5 |  |  |  |  |
6 | 1 | 400ns |  |  | our $VERSION = '1.24';
7 |  |  |  |  |
8 | 2 | 146µs | 2 | 79µs | # spent 43µs (8+36) within Params::Validate::XS::BEGIN@8 which was called: # once (8µs+36µs) by Module::Runtime::require_module at line 8 use Carp; # spent 43µs making 1 call to Params::Validate::XS::BEGIN@8 # spent 36µs making 1 call to Exporter::import
9 |  |  |  |  |
10 |  |  |  |  | my $default_fail = sub {
11 |  |  |  |  | Carp::confess( $_[0] );
12 | 1 | 2µs |  |  | };
13 |  |  |  |  |
14 |  |  |  |  | {
15 | 2 | 5µ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 | 1µ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 | 88µs | 1 | 5µs | # spent 5µs within Params::Validate::XS::BEGIN@38 which was called: # once (5µs+0s) by Module::Runtime::require_module at line 38 use XSLoader; # spent 5µs making 1 call to Params::Validate::XS::BEGIN@38
39 |  |  |  |  | XSLoader::load(
40 |  |  |  |  | __PACKAGE__,
41 |  |  |  |  | exists $Params::Validate::XS::{VERSION}
42 | 1 | 212µs | 1 | 207µs | ? ${ $Params::Validate::XS::{VERSION} } # spent 207µs making 1 call to XSLoader::load
43 |  |  |  |  | : (),
44 |  |  |  |  | );
45 |  |  |  |  | }
46 |  |  |  |  |
47 |  |  |  |  | # spent 53.7ms (33.8+19.8) within Params::Validate::XS::_check_regex_from_xs which was called 7000 times, avg 8µs/call: # 4000 times (17.1ms+10.4ms) by Params::Validate::XS::validate at line 2009 of DateTime.pm, avg 7µs/call # 3000 times (16.7ms+9.46ms) by Params::Validate::XS::validate at line 497 of DateTime.pm, avg 9µs/call sub _check_regex_from_xs {
48 | 7000 | 60.3ms | 14000 | 19.8ms | return ( defined $_[0] ? $_[0] : '' ) =~ /$_[1]/ ? 1 : 0; # spent 12.0ms making 7000 calls to Params::Validate::XS::CORE:match, avg 2µs/call # spent 7.83ms making 7000 calls to Params::Validate::XS::CORE:regcomp, avg 1µs/call
49 |  |  |  |  | }
50 |  |  |  |  |
51 | 1 | 7µs |  |  | 1;
|  |  |  |  | # spent 12.0ms within Params::Validate::XS::CORE:match which was called 7000 times, avg 2µs/call: # 7000 times (12.0ms+0s) by Params::Validate::XS::_check_regex_from_xs at line 48, avg 2µs/call sub Params::Validate::XS::CORE:match; # opcode
|  |  |  |  | # spent 7.83ms within Params::Validate::XS::CORE:regcomp which was called 7000 times, avg 1µs/call: # 7000 times (7.83ms+0s) by Params::Validate::XS::_check_regex_from_xs at line 48, avg 1µs/call sub Params::Validate::XS::CORE:regcomp; # opcode
|  |  |  |  | # spent 762ms (511+252) within Params::Validate::XS::validate which was called 22002 times, avg 35µs/call: # 6000 times (338ms+169ms) by DateTime::new at line 197 of DateTime.pm, avg 84µs/call # 6000 times (92.9ms+28.9ms) by DateTime::set at line 1954 of DateTime.pm, avg 20µs/call # 4000 times (33.2ms+27.5ms) by DateTime::truncate at line 2009 of DateTime.pm, avg 15µs/call # 3002 times (16.5ms+0s) by DateTime::TimeZone::new at line 35 of DateTime/TimeZone.pm, avg 6µs/call # 3000 times (30.5ms+26.2ms) by DateTime::from_epoch at line 497 of DateTime.pm, avg 19µs/call sub Params::Validate::XS::validate; # xsub
|  |  |  |  | # spent 12µs within Params::Validate::XS::validate_pos which was called 2 times, avg 6µs/call: # 2 times (12µs+0s) by DateTime::Locale::load at line 191 of DateTime/Locale.pm, avg 6µs/call sub Params::Validate::XS::validate_pos; # xsub