Profile of Params/Validate.pm

← Index
NYTProf Performance Profile «line view»
For -e
Run on Thu Jun 30 16:16:00 2016
Reported on Thu Jun 30 16:16:08 2016

Filename | /home/s1/perl5/perlbrew/perls/perl-5.22.1/lib/site_perl/5.22.1/x86_64-linux/Params/Validate.pm
Statements | Executed 26 statements in 1.69ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 1.60ms | 9.01ms | Params::Validate::::BEGIN@11Params::Validate::BEGIN@11
1 | 1 | 1 | 918µs | 1.08ms | Params::Validate::::BEGIN@12Params::Validate::BEGIN@12
1 | 1 | 1 | 26µs | 26µs | Params::Validate::::BEGIN@3Params::Validate::BEGIN@3
1 | 1 | 1 | 11µs | 15µs | Params::Validate::::BEGIN@5Params::Validate::BEGIN@5
1 | 1 | 1 | 11µs | 72µs | Params::Validate::::BEGIN@14Params::Validate::BEGIN@14
1 | 1 | 1 | 11µs | 40µs | Params::Validate::::BEGIN@10Params::Validate::BEGIN@10
1 | 1 | 1 | 10µs | 16µs | Params::Validate::::BEGIN@6Params::Validate::BEGIN@6

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;
2 |  |  |  |  |
3 | 2 | 60µs | 1 | 26µs | # spent 26µs within Params::Validate::BEGIN@3 which was called: # once (26µs+0s) by DateTime::Duration::BEGIN@11 at line 3 use 5.008001; # spent 26µs making 1 call to Params::Validate::BEGIN@3
4 |  |  |  |  |
5 | 2 | 32µs | 2 | 18µs | # spent 15µs (11+4) within Params::Validate::BEGIN@5 which was called: # once (11µs+4µs) by DateTime::Duration::BEGIN@11 at line 5 use strict; # spent 15µs making 1 call to Params::Validate::BEGIN@5 # spent 4µs making 1 call to strict::import
6 | 2 | 47µs | 2 | 23µs | # spent 16µs (10+6) within Params::Validate::BEGIN@6 which was called: # once (10µs+6µs) by DateTime::Duration::BEGIN@11 at line 6 use warnings; # spent 16µs making 1 call to Params::Validate::BEGIN@6 # spent 6µs making 1 call to warnings::import
7 |  |  |  |  |
8 | 1 | 600ns |  |  | our $VERSION = '1.24';
9 |  |  |  |  |
10 | 2 | 38µs | 2 | 68µs | # spent 40µs (11+29) within Params::Validate::BEGIN@10 which was called: # once (11µs+29µs) by DateTime::Duration::BEGIN@11 at line 10 use Exporter; # spent 40µs making 1 call to Params::Validate::BEGIN@10 # spent 29µs making 1 call to Exporter::import
11 | 2 | 579µs | 1 | 9.01ms | # spent 9.01ms (1.60+7.41) within Params::Validate::BEGIN@11 which was called: # once (1.60ms+7.41ms) by DateTime::Duration::BEGIN@11 at line 11 use Module::Implementation; # spent 9.01ms making 1 call to Params::Validate::BEGIN@11
12 | 2 | 670µs | 2 | 1.18ms | # spent 1.08ms (918µs+159µs) within Params::Validate::BEGIN@12 which was called: # once (918µs+159µs) by DateTime::Duration::BEGIN@11 at line 12 use Params::Validate::Constants; # spent 1.08ms making 1 call to Params::Validate::BEGIN@12 # spent 103µs making 1 call to Exporter::import
13 |  |  |  |  |
14 | 2 | 221µs | 2 | 133µs | # spent 72µs (11+61) within Params::Validate::BEGIN@14 which was called: # once (11µs+61µs) by DateTime::Duration::BEGIN@11 at line 14 use vars qw( $NO_VALIDATION %OPTIONS $options ); # spent 72µs making 1 call to Params::Validate::BEGIN@14 # spent 61µs making 1 call to vars::import
15 |  |  |  |  |
16 | 1 | 8µs |  |  | our @ISA = 'Exporter';
17 |  |  |  |  |
18 | 1 | 2µs |  |  | my @types = qw(
19 |  |  |  |  | SCALAR
20 |  |  |  |  | ARRAYREF
21 |  |  |  |  | HASHREF
22 |  |  |  |  | CODEREF
23 |  |  |  |  | GLOB
24 |  |  |  |  | GLOBREF
25 |  |  |  |  | SCALARREF
26 |  |  |  |  | HANDLE
27 |  |  |  |  | BOOLEAN
28 |  |  |  |  | UNDEF
29 |  |  |  |  | OBJECT
30 |  |  |  |  | );
31 |  |  |  |  |
32 | 1 | 4µs |  |  | our %EXPORT_TAGS = (
33 |  |  |  |  | 'all' => [
34 |  |  |  |  | qw( validate validate_pos validation_options validate_with ),
35 |  |  |  |  | @types
36 |  |  |  |  | ],
37 |  |  |  |  | types => \@types,
38 |  |  |  |  | );
39 |  |  |  |  |
40 | 1 | 3µs |  |  | our @EXPORT_OK = ( @{ $EXPORT_TAGS{all} }, 'set_options' );
41 | 1 | 500ns |  |  | our @EXPORT = qw( validate validate_pos );
42 |  |  |  |  |
43 | 1 | 700ns |  |  | $NO_VALIDATION = $ENV{PERL_NO_VALIDATION};
44 |  |  |  |  |
45 |  |  |  |  | {
46 | 2 | 5µs | 1 | 38µs | my $loader = Module::Implementation::build_loader_sub( # spent 38µs making 1 call to Module::Implementation::build_loader_sub
47 |  |  |  |  | implementations => [ 'XS', 'PP' ],
48 |  |  |  |  | symbols => [
49 |  |  |  |  | qw(
50 |  |  |  |  | validate
51 |  |  |  |  | validate_pos
52 |  |  |  |  | validate_with
53 |  |  |  |  | validation_options
54 |  |  |  |  | set_options
55 |  |  |  |  | ),
56 |  |  |  |  | ],
57 |  |  |  |  | );
58 |  |  |  |  |
59 | 1 | 600ns |  |  | $ENV{PARAMS_VALIDATE_IMPLEMENTATION} = 'PP' if $ENV{PV_TEST_PERL};
60 |  |  |  |  |
61 | 1 | 8µs | 1 | 1.46ms | $loader->(); # spent 1.46ms making 1 call to Module::Implementation::__ANON__[Module/Implementation.pm:52]
62 |  |  |  |  | }
63 |  |  |  |  |
64 | 1 | 13µs |  |  | 1;
65 |  |  |  |  |
66 |  |  |  |  | # ABSTRACT: Validate method/function parameters
67 |  |  |  |  |
68 |  |  |  |  | __END__