Filename | /usr/local/lib/perl/5.18.2/List/Util.pm |
Statements | Executed 77 statements in 542µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
629068 | 6 | 2 | 1.15s | 1.15s | all (xsub) | List::Util::
45 | 2 | 2 | 418µs | 547µs | any (xsub) | List::Util::
65 | 4 | 2 | 203µs | 486µs | first (xsub) | List::Util::
16 | 16 | 16 | 137µs | 137µs | import | List::Util::
1 | 1 | 1 | 8µs | 17µs | BEGIN@9 | List::Util::
1 | 1 | 1 | 5µs | 12µs | BEGIN@30 | List::Util::
0 | 0 | 0 | 0s | 0s | key | List::Util::_Pair::
0 | 0 | 0 | 0s | 0s | value | List::Util::_Pair::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # Copyright (c) 1997-2009 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
2 | # This program is free software; you can redistribute it and/or | ||||
3 | # modify it under the same terms as Perl itself. | ||||
4 | # | ||||
5 | # Maintained since 2013 by Paul Evans <leonerd@leonerd.org.uk> | ||||
6 | |||||
7 | package List::Util; | ||||
8 | |||||
9 | 2 | 85µs | 2 | 26µs | # spent 17µs (8+9) within List::Util::BEGIN@9 which was called:
# once (8µs+9µs) by Module::Pluggable::Object::BEGIN@4 at line 9 # spent 17µs making 1 call to List::Util::BEGIN@9
# spent 9µs making 1 call to strict::import |
10 | 1 | 400ns | require Exporter; | ||
11 | |||||
12 | 1 | 4µs | our @ISA = qw(Exporter); | ||
13 | 1 | 2µs | our @EXPORT_OK = qw( | ||
14 | all any first min max minstr maxstr none notall product reduce sum sum0 shuffle | ||||
15 | pairmap pairgrep pairfirst pairs pairkeys pairvalues | ||||
16 | ); | ||||
17 | 1 | 200ns | our $VERSION = "1.39"; | ||
18 | 1 | 200ns | our $XS_VERSION = $VERSION; | ||
19 | 1 | 11µs | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval | ||
20 | |||||
21 | 1 | 300ns | require XSLoader; | ||
22 | 1 | 152µs | 1 | 147µs | XSLoader::load('List::Util', $XS_VERSION); # spent 147µs making 1 call to XSLoader::load |
23 | |||||
24 | sub import | ||||
25 | # spent 137µs within List::Util::import which was called 16 times, avg 9µs/call:
# once (11µs+0s) by Moose::Meta::Attribute::BEGIN@8 at line 8 of Moose/Meta/Attribute.pm
# once (10µs+0s) by Moose::Meta::TypeConstraint::DuckType::BEGIN@10 at line 10 of Moose/Meta/TypeConstraint/DuckType.pm
# once (10µs+0s) by Moose::Meta::Role::Application::ToInstance::BEGIN@9 at line 9 of Moose/Meta/Role/Application/ToInstance.pm
# once (9µs+0s) by Moose::Meta::Role::Application::BEGIN@9 at line 9 of Moose/Meta/Role/Application.pm
# once (9µs+0s) by Moose::Meta::Method::Accessor::Native::Writer::BEGIN@7 at line 7 of Moose/Meta/Method/Accessor/Native/Writer.pm
# once (8µs+0s) by Moose::Meta::Class::BEGIN@9 at line 9 of Moose/Meta/Class.pm
# once (8µs+0s) by Getopt::Long::Descriptive::BEGIN@9 at line 9 of Getopt/Long/Descriptive.pm
# once (8µs+0s) by Class::MOP::Class::BEGIN@18 at line 18 of Class/MOP/Class.pm
# once (8µs+0s) by Moose::Meta::TypeConstraint::Union::BEGIN@10 at line 10 of Moose/Meta/TypeConstraint/Union.pm
# once (8µs+0s) by Getopt::Long::Descriptive::Usage::BEGIN@6 at line 6 of Getopt/Long/Descriptive/Usage.pm
# once (8µs+0s) by Moose::Meta::Role::Attribute::BEGIN@7 at line 7 of Moose/Meta/Role/Attribute.pm
# once (8µs+0s) by HTTP::Server::PSGI::BEGIN@11 at line 11 of HTTP/Server/PSGI.pm
# once (8µs+0s) by Moose::Util::MetaRole::BEGIN@8 at line 8 of Moose/Util/MetaRole.pm
# once (8µs+0s) by Moose::Meta::Role::Application::ToClass::BEGIN@8 at line 8 of Moose/Meta/Role/Application/ToClass.pm
# once (8µs+0s) by Moose::Meta::Role::Application::RoleSummation::BEGIN@8 at line 8 of Moose/Meta/Role/Application/RoleSummation.pm
# once (5µs+0s) by Moose::Util::BEGIN@12 at line 12 of Moose/Util.pm | ||||
26 | 16 | 14µs | my $pkg = caller; | ||
27 | |||||
28 | # (RT88848) Touch the caller's $a and $b, to avoid the warning of | ||||
29 | # Name "main::a" used only once: possible typo" warning | ||||
30 | 2 | 84µs | 2 | 20µs | # spent 12µs (5+7) within List::Util::BEGIN@30 which was called:
# once (5µs+7µs) by Module::Pluggable::Object::BEGIN@4 at line 30 # spent 12µs making 1 call to List::Util::BEGIN@30
# spent 7µs making 1 call to strict::unimport |
31 | 16 | 52µs | ${"${pkg}::a"} = ${"${pkg}::a"}; | ||
32 | 16 | 32µs | ${"${pkg}::b"} = ${"${pkg}::b"}; | ||
33 | |||||
34 | 16 | 99µs | 16 | 404µs | goto &Exporter::import; # spent 404µs making 16 calls to Exporter::import, avg 25µs/call |
35 | } | ||||
36 | |||||
37 | # For objects returned by pairs() | ||||
38 | sub List::Util::_Pair::key { shift->[0] } | ||||
39 | sub List::Util::_Pair::value { shift->[1] } | ||||
40 | |||||
41 | 1 | 5µs | 1; | ||
42 | |||||
43 | __END__ | ||||
# spent 1.15s (1.15+85µs) within List::Util::all which was called 629068 times, avg 2µs/call:
# 303347 times (702ms+0s) by PONAPI::Builder::Document::_add_included or PONAPI::Builder::Document::_add_resource_builder or PONAPI::Builder::Relationship::_add_resource_id_builder at line 14 of (eval 45)[Eval/Closure.pm:144], avg 2µs/call
# 270247 times (330ms+0s) by PONAPI::Builder::Resource::has_relationship_for at line 21 of (eval 45)[Eval/Closure.pm:144], avg 1µs/call
# 55431 times (110ms+0s) by PONAPI::Builder::Document::has_included at line 15 of (eval 45)[Eval/Closure.pm:144], avg 2µs/call
# 36 times (4.61ms+78µs) by Class::MOP::Class::_check_metaclass_compatibility at line 211 of Class/MOP/Class.pm, avg 130µs/call
# 4 times (15µs+0s) by Test::PONAPI::Repository::MockDB::Table::Relationships::new at line 76 of (eval 45)[Eval/Closure.pm:144], avg 4µs/call
# 3 times (49µs+7µs) by Test::PONAPI::Repository::MockDB::Table::Articles::new or Test::PONAPI::Repository::MockDB::Table::Comments::new or Test::PONAPI::Repository::MockDB::Table::People::new at line 41 of (eval 45)[Eval/Closure.pm:144], avg 19µs/call | |||||
# spent 547µs (418+129) within List::Util::any which was called 45 times, avg 12µs/call:
# 28 times (384µs+129µs) by Moose::Meta::Class::_eval_environment at line 542 of Moose/Meta/Class.pm, avg 18µs/call
# 17 times (34µs+0s) by Moose::Meta::Method::Accessor::Native::Writer::_is_root_type at line 103 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 2µs/call | |||||
# spent 486µs (203+282) within List::Util::first which was called 65 times, avg 7µs/call:
# 61 times (186µs+277µs) by Data::OptList::__is_a at line 27 of Data/OptList.pm, avg 8µs/call
# 2 times (8µs+3µs) by Sub::Exporter::Progressive::__ANON__[/usr/local/share/perl/5.18.2/Sub/Exporter/Progressive.pm:40] at line 26 of Sub/Exporter/Progressive.pm, avg 5µs/call
# once (7µs+2µs) by Sub::Exporter::Progressive::sub_export_options at line 71 of Sub/Exporter/Progressive.pm
# once (3µs+0s) by Sub::Exporter::Progressive::sub_export_options at line 66 of Sub/Exporter/Progressive.pm |