← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 09:58:41 2014
Reported on Tue Jun 24 09:59:11 2014

Filename/usr/share/perl/5.14/Exporter.pm
StatementsExecuted 6876 statements in 15.7ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
27426313613.5ms16.5msExporter::::importExporter::import
14213.21ms3.37msExporter::::as_heavyExporter::as_heavy
122421557µs557µsExporter::::CORE:substExporter::CORE:subst (opcode)
85321475µs475µsExporter::::CORE:matchExporter::CORE:match (opcode)
102248µs167µsExporter::::exportExporter::export
43327µs3.28msExporter::::export_to_levelExporter::export_to_level
0000s0sExporter::::__ANON__[:65]Exporter::__ANON__[:65]
0000s0sExporter::::export_failExporter::export_fail
0000s0sExporter::::export_ok_tagsExporter::export_ok_tags
0000s0sExporter::::export_tagsExporter::export_tags
0000s0sExporter::::require_versionExporter::require_version
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Exporter;
2
3126µsrequire 5.006;
4
5# Be lean.
6#use strict;
7#no strict 'refs';
8
91700nsour $Debug = 0;
101200nsour $ExportLevel = 0;
111700nsour $Verbose ||= 0;
121700nsour $VERSION = '5.64_03';
131600nsour (%Cache);
14
15
# spent 3.37ms (3.21+166µs) within Exporter::as_heavy which was called 14 times, avg 241µs/call: # 10 times (90µs+28µs) by Exporter::export at line 25, avg 12µs/call # 4 times (3.12ms+138µs) by Exporter::export_to_level at line 82, avg 814µs/call
sub as_heavy {
1670405µs require Exporter::Heavy;
17 # Unfortunately, this does not work if the caller is aliased as *name = \&foo
18 # Thus the need to create a lot of identical subroutines
19 my $c = (caller(1))[3];
201449µs $c =~ s/.*:://;
# spent 49µs making 14 calls to Exporter::CORE:subst, avg 4µs/call
21 \&{"Exporter::Heavy::heavy_$c"};
22}
23
24
# spent 167µs (48+118) within Exporter::export which was called 10 times, avg 17µs/call: # 6 times (27µs+71µs) by Exporter::import at line 63, avg 16µs/call # 4 times (22µs+47µs) by Exporter::Heavy::heavy_export_to_level at line 200 of Exporter/Heavy.pm, avg 17µs/call
sub export {
252060µs202.54ms goto &{as_heavy()};
# spent 2.42ms making 10 calls to Exporter::Heavy::heavy_export, avg 242µs/call # spent 118µs making 10 calls to Exporter::as_heavy, avg 12µs/call
26}
27
28
# spent 16.5ms (13.5+3.04) within Exporter::import which was called 274 times, avg 60µs/call: # 6 times (269µs+18µs) by DateTime::TimeZone::OlsonDB::Observance::BEGIN@16 or DateTime::TimeZone::OlsonDB::Zone::BEGIN@17 or Moose::Meta::Class::BEGIN@17 or Moose::Meta::TypeConstraint::Union::BEGIN@17 or Moose::Util::BEGIN@17 or Moose::Util::MetaRole::BEGIN@15 at line 36 of List/Util.pm, avg 48µs/call # 4 times (109µs+6µs) by MongoDB::Collection::BEGIN@29 or MongoDB::Connection::BEGIN@34 or MongoDB::Cursor::BEGIN@25 or MongoDB::MongoClient::BEGIN@33 at line 26 of boolean.pm, avg 29µs/call # 3 times (1.88ms+373µs) by POSIX::import at line 29 of POSIX.pm, avg 751µs/call # 2 times (49µs+2µs) by Class::MOP::Package::BEGIN@15 or Moose::Meta::Role::BEGIN@16 at line 38 of Sub/Exporter/Progressive.pm, avg 26µs/call # once (327µs+1.36ms) by Sys::Syslog::BEGIN@10 at line 10 of Sys/Syslog.pm # once (730µs+70µs) by POSIX::BEGIN@13 at line 13 of POSIX.pm # once (625µs+30µs) by Mail::Sendmail::BEGIN@54 at line 54 of Mail/Sendmail.pm # once (86µs+339µs) by Log::Writer::Syslog::BEGIN@70 at line 70 of Log/Writer/Syslog.pm # once (46µs+186µs) by Value::Convertor::BEGIN@60 at line 60 of Value/Convertor.pm # once (213µs+4µs) by Data::Dumper::BEGIN@20 at line 20 of Data/Dumper.pm # once (142µs+7µs) by Params::Validate::BEGIN@13 at line 13 of Params/Validate.pm # once (138µs+6µs) by MongoDB::GridFS::File::BEGIN@27 at line 26 of IO/File.pm # once (125µs+10µs) by DateTime::Duration::BEGIN@12 at line 12 of DateTime/Duration.pm # once (120µs+7µs) by MongoDB::GridFS::File::BEGIN@27 at line 27 of MongoDB/GridFS/File.pm # once (117µs+7µs) by Log::Writer::File::BEGIN@66 at line 66 of Log/Writer/File.pm # once (113µs+9µs) by Value::Convertor::BEGIN@53 at line 53 of Value/Convertor.pm # once (109µs+7µs) by Mutex::Flock::BEGIN@71 at line 71 of Mutex/Flock.pm # once (111µs+5µs) by DateTime::TimeZone::BEGIN@19 at line 19 of DateTime/TimeZone.pm # once (106µs+6µs) by DateTime::BEGIN@47 at line 48 of DateTime.pm # once (103µs+4µs) by Value::Convertor::BEGIN@52 at line 52 of Value/Convertor.pm # once (15µs+89µs) by Storable::BEGIN@51 at line 53 of Storable.pm # once (93µs+6µs) by DateTime::TimeZone::Local::BEGIN@12 at line 12 of DateTime/TimeZone/Local.pm # once (92µs+4µs) by Sub::Install::BEGIN@9 at line 9 of Sub/Install.pm # once (88µs+4µs) by DateTime::TimeZone::Local::Unix::BEGIN@12 at line 12 of DateTime/TimeZone/Local/Unix.pm # once (87µs+4µs) by DateTime::TimeZone::OlsonDB::Observance::BEGIN@17 at line 17 of DateTime/TimeZone/OlsonDB/Observance.pm # once (86µs+4µs) by DateTime::TimeZone::OlsonDB::Change::BEGIN@12 at line 12 of DateTime/TimeZone/OlsonDB/Change.pm # once (84µs+6µs) by Net::CIDR::Lite::BEGIN@5 at line 5 of Net/CIDR/Lite.pm # once (15µs+74µs) by Mutex::Flock::BEGIN@72 at line 72 of Mutex/Flock.pm # once (82µs+4µs) by Date::Parse::BEGIN@12 at line 12 of Date/Parse.pm # once (81µs+4µs) by Try::Tiny::BEGIN@17 at line 17 of Try/Tiny.pm # once (81µs+4µs) by Time::Local::BEGIN@4 at line 4 of Time/Local.pm # once (80µs+4µs) by DateTime::Locale::BEGIN@12 at line 12 of DateTime/Locale.pm # once (79µs+4µs) by DateTime::BEGIN@42 at line 42 of DateTime.pm # once (78µs+4µs) by Tie::Hash::BEGIN@5 at line 5 of Tie/Hash.pm # once (74µs+3µs) by Time::Zone::BEGIN@45 at line 45 of Time/Zone.pm # once (73µs+4µs) by Module::Implementation::BEGIN@13 at line 13 of Module/Implementation.pm # once (16µs+61µs) by Log::Writer::Email::BEGIN@70 at line 70 of Log/Writer/Email.pm # once (70µs+6µs) by Package::DeprecationManager::BEGIN@11 at line 11 of Package/DeprecationManager.pm # once (71µs+3µs) by Date::Parse::BEGIN@11 at line 11 of Date/Parse.pm # once (70µs+3µs) by DateTime::TimeZone::OlsonDB::Rule::BEGIN@16 at line 16 of DateTime/TimeZone/OlsonDB/Rule.pm # once (69µs+3µs) by DateTime::TimeZone::OffsetOnly::BEGIN@15 at line 15 of DateTime/TimeZone/OffsetOnly.pm # once (66µs+6µs) by Package::DeprecationManager::BEGIN@10 at line 10 of Package/DeprecationManager.pm # once (69µs+3µs) by DateTime::TimeZone::OlsonDB::Zone::BEGIN@18 at line 18 of DateTime/TimeZone/OlsonDB/Zone.pm # once (68µs+4µs) by Class::Load::BEGIN@16 at line 16 of Class/Load.pm # once (66µs+3µs) by Date::Parse::BEGIN@10 at line 10 of Date/Parse.pm # once (66µs+3µs) by DateTime::TimeZone::OlsonDB::BEGIN@16 at line 16 of DateTime/TimeZone/OlsonDB.pm # once (65µs+3µs) by DateTime::BEGIN@50 at line 50 of DateTime.pm # once (64µs+3µs) by Net::CIDR::Lite::Span::BEGIN@357 at line 357 of Net/CIDR/Lite.pm # once (62µs+3µs) by Data::OptList::BEGIN@10 at line 96 of Params/Util.pm # once (61µs+3µs) by DateTime::Locale::Base::BEGIN@6 at line 6 of DateTime/Locale/Base.pm # once (60µs+2µs) by Value::Convertor::BEGIN@55 at line 55 of Value/Convertor.pm # once (57µs+3µs) by DateTime::Locale::Base::BEGIN@9 at line 9 of DateTime/Locale/Base.pm # once (53µs+2µs) by Try::Tiny::BEGIN@1 at line 1 of (eval 7)[Try/Tiny.pm:20] # once (50µs+4µs) by Log::Writer::Email::BEGIN@71 at line 71 of Log/Writer/Email.pm # once (50µs+3µs) by MongoDB::MongoClient::BEGIN@34 at line 34 of MongoDB/MongoClient.pm # once (51µs+0s) by Class::Load::XS::BEGIN@9 at line 9 of Class/Load/XS.pm # once (41µs+2µs) by Log::Loger::BEGIN@108 at line 108 of Log/Loger.pm # once (41µs+1µs) by Log::Channel::Module::BEGIN@70 at line 70 of Log/Channel/Module.pm # once (39µs+2µs) by Mentat::Storage::Mongo::BEGIN@149 at line 149 of Mentat/Storage/Mongo.pm # once (38µs+2µs) by Class::MOP::Method::Inlined::BEGIN@13 at line 13 of Class/MOP/Method/Inlined.pm # once (40µs+0s) by bigint::BEGIN@5 at line 5 of bigint.pm # once (39µs+1µs) by Moose::Meta::Attribute::BEGIN@15 at line 15 of Moose/Meta/Attribute.pm # once (38µs+2µs) by IO::File::BEGIN@8 at line 8 of IO/File.pm # once (37µs+2µs) by Class::MOP::Instance::BEGIN@13 at line 13 of Class/MOP/Instance.pm # once (37µs+2µs) by Socket::BEGIN@667 at line 667 of Socket.pm # once (37µs+2µs) by Class::MOP::BEGIN@19 at line 19 of Class/MOP.pm # once (37µs+1µs) by Encode::BEGIN@48 at line 48 of Encode.pm # once (36µs+2µs) by IO::Seekable::BEGIN@6 at line 6 of IO/Seekable.pm # once (36µs+2µs) by Mentat::Storage::BEGIN@56 at line 56 of Mentat/Storage.pm # once (35µs+2µs) by Log::Writer::Std::BEGIN@63 at line 63 of Log/Writer/Std.pm # once (35µs+2µs) by Log::Filter::Severity::BEGIN@70 at line 70 of Log/Filter/Severity.pm # once (37µs+0s) by Cwd::BEGIN@4 at line 4 of Cwd.pm # once (35µs+2µs) by Log::Writer::Syslog::BEGIN@67 at line 67 of Log/Writer/Syslog.pm # once (35µs+2µs) by Moose::Meta::Method::Constructor::BEGIN@15 at line 15 of Moose/Meta/Method/Constructor.pm # once (34µs+2µs) by IO::File::BEGIN@9 at line 9 of IO/File.pm # once (36µs+0s) by Params::Validate::BEGIN@11 at line 11 of Params/Validate.pm # once (34µs+2µs) by Log::Writer::Email::BEGIN@66 at line 66 of Log/Writer/Email.pm # once (34µs+2µs) by Log::Filter::Source::BEGIN@70 at line 70 of Log/Filter/Source.pm # once (34µs+1µs) by Log::Writer::Email::BEGIN@68 at line 68 of Log/Writer/Email.pm # once (34µs+1µs) by Log::Filter::All::BEGIN@66 at line 66 of Log/Filter/All.pm # once (34µs+2µs) by Log::Channel::Channel::BEGIN@69 at line 69 of Log/Channel/Channel.pm # once (34µs+2µs) by Log::Filter::Module::BEGIN@73 at line 73 of Log/Filter/Module.pm # once (33µs+2µs) by Log::Writer::Module::BEGIN@61 at line 61 of Log/Writer/Module.pm # once (33µs+2µs) by Log::Core::Essentials::BEGIN@67 at line 67 of Log/Core/Essentials.pm # once (33µs+2µs) by Log::Writer::Handle::BEGIN@108 at line 108 of Log/Writer/Handle.pm # once (33µs+1µs) by SelectSaver::BEGIN@6 at line 6 of SelectSaver.pm # once (35µs+0s) by Date::Parse::BEGIN@13 at line 13 of Date/Parse.pm # once (33µs+2µs) by Log::Writer::Syslog::BEGIN@69 at line 69 of Log/Writer/Syslog.pm # once (33µs+2µs) by Log::Writer::File::BEGIN@64 at line 64 of Log/Writer/File.pm # once (33µs+2µs) by Mutex::Flock::BEGIN@70 at line 70 of Mutex/Flock.pm # once (33µs+2µs) by Log::Filter::None::BEGIN@66 at line 66 of Log/Filter/None.pm # once (33µs+2µs) by Class::MOP::Method::Constructor::BEGIN@15 at line 15 of Class/MOP/Method/Constructor.pm # once (33µs+2µs) by Log::Filter::Threshold::BEGIN@81 at line 81 of Log/Filter/Threshold.pm # once (33µs+2µs) by Sys::Syslog::BEGIN@5 at line 5 of Sys/Syslog.pm # once (33µs+1µs) by Class::MOP::Package::BEGIN@13 at line 13 of Class/MOP/Package.pm # once (32µs+2µs) by Log::Filter::Re::BEGIN@81 at line 81 of Log/Filter/Re.pm # once (32µs+1µs) by Class::MOP::Method::BEGIN@14 at line 14 of Class/MOP/Method.pm # once (32µs+1µs) by Log::Writer::Handle::BEGIN@111 at line 111 of Log/Writer/Handle.pm # once (32µs+1µs) by Moose::Util::TypeConstraints::Builtins::BEGIN@14 at line 14 of Moose/Util/TypeConstraints/Builtins.pm # once (32µs+2µs) by IO::Handle::BEGIN@6 at line 6 of IO/Handle.pm # once (32µs+1µs) by Mail::Sendmail::BEGIN@55 at line 55 of Mail/Sendmail.pm # once (32µs+2µs) by Log::Filter::Set::BEGIN@79 at line 79 of Log/Filter/Set.pm # once (31µs+2µs) by Moose::Meta::Class::BEGIN@18 at line 18 of Moose/Meta/Class.pm # once (31µs+1µs) by Moose::Meta::Attribute::BEGIN@14 at line 14 of Moose/Meta/Attribute.pm # once (31µs+2µs) by Eval::Closure::BEGIN@15 at line 15 of Eval/Closure.pm # once (31µs+1µs) by Sys::Hostname::Long::BEGIN@3 at line 3 of Sys/Hostname/Long.pm # once (31µs+2µs) by Clone::BEGIN@5 at line 5 of Clone.pm # once (31µs+2µs) by IO::Seekable::BEGIN@12 at line 12 of IO/Seekable.pm # once (31µs+1µs) by Class::MOP::Class::BEGIN@21 at line 21 of Class/MOP/Class.pm # once (30µs+2µs) by Log::Filter::Message::BEGIN@71 at line 71 of Log/Filter/Message.pm # once (31µs+900ns) by MongoDB::MongoClient::BEGIN@32 at line 32 of MongoDB/MongoClient.pm # once (30µs+1µs) by Moose::Exporter::BEGIN@14 at line 14 of Moose/Exporter.pm # once (30µs+1µs) by IO::Handle::BEGIN@7 at line 7 of IO/Handle.pm # once (30µs+1µs) by Moose::Meta::Method::Destructor::BEGIN@15 at line 15 of Moose/Meta/Method/Destructor.pm # once (30µs+1µs) by Moose::Meta::Class::Immutable::Trait::BEGIN@13 at line 13 of Moose/Meta/Class/Immutable/Trait.pm # once (30µs+2µs) by IO::BEGIN@6 at line 6 of IO.pm # once (30µs+1µs) by Moose::Util::BEGIN@12 at line 12 of Moose/Util.pm # once (30µs+1µs) by Class::MOP::Module::BEGIN@13 at line 13 of Class/MOP/Module.pm # once (30µs+2µs) by Moose::Meta::Method::Accessor::BEGIN@13 at line 13 of Moose/Meta/Method/Accessor.pm # once (30µs+1µs) by Class::MOP::MiniTrait::BEGIN@12 at line 12 of Class/MOP/MiniTrait.pm # once (29µs+2µs) by SelectSaver::BEGIN@7 at line 7 of SelectSaver.pm # once (30µs+1µs) by IO::File::BEGIN@11 at line 11 of IO/File.pm # once (29µs+2µs) by Sys::Hostname::BEGIN@5 at line 5 of Sys/Hostname.pm # once (30µs+1µs) by Moose::Meta::TypeConstraint::BEGIN@24 at line 24 of Moose/Meta/TypeConstraint.pm # once (29µs+1µs) by Class::MOP::Mixin::HasMethods::BEGIN@15 at line 15 of Class/MOP/Mixin/HasMethods.pm # once (29µs+1µs) by Sys::Syslog::BEGIN@8 at line 8 of Sys/Syslog.pm # once (29µs+1µs) by Class::MOP::Method::Meta::BEGIN@14 at line 14 of Class/MOP/Method/Meta.pm # once (29µs+1µs) by MIME::QuotedPrint::BEGIN@12 at line 12 of MIME/QuotedPrint.pm # once (29µs+1µs) by Moose::Meta::Role::Application::ToClass::BEGIN@15 at line 15 of Moose/Meta/Role/Application/ToClass.pm # once (29µs+1µs) by Eval::Closure::BEGIN@18 at line 18 of Eval/Closure.pm # once (29µs+1000ns) by Log::Filter::Message::BEGIN@5 at line 5 of Log/Filter/Message.pm # once (29µs+1µs) by Class::MOP::Attribute::BEGIN@17 at line 17 of Class/MOP/Attribute.pm # once (29µs+1µs) by Moose::Util::TypeConstraints::BEGIN@11 at line 11 of Moose/Util/TypeConstraints.pm # once (29µs+1µs) by Moose::Meta::Method::Destructor::BEGIN@14 at line 14 of Moose/Meta/Method/Destructor.pm # once (28µs+1µs) by Class::MOP::Method::Accessor::BEGIN@15 at line 15 of Class/MOP/Method/Accessor.pm # once (29µs+1µs) by Moose::Util::MetaRole::BEGIN@11 at line 11 of Moose/Util/MetaRole.pm # once (28µs+1µs) by Moose::Meta::Role::Attribute::BEGIN@14 at line 14 of Moose/Meta/Role/Attribute.pm # once (28µs+1000ns) by Class::MOP::Mixin::AttributeCore::BEGIN@12 at line 12 of Class/MOP/Mixin/AttributeCore.pm # once (28µs+1µs) by Class::MOP::BEGIN@21 at line 21 of Class/MOP.pm # once (28µs+1000ns) by Class::MOP::Method::Generated::BEGIN@13 at line 13 of Class/MOP/Method/Generated.pm # once (27µs+1µs) by Moose::Meta::Method::Constructor::BEGIN@16 at line 16 of Moose/Meta/Method/Constructor.pm # once (28µs+1µs) by Class::MOP::Attribute::BEGIN@16 at line 16 of Class/MOP/Attribute.pm # once (28µs+1µs) by Moose::Meta::Attribute::Native::BEGIN@9 at line 9 of Moose/Meta/Attribute/Native.pm # once (27µs+1µs) by metaclass::BEGIN@16 at line 16 of metaclass.pm # once (27µs+1µs) by Class::MOP::Class::BEGIN@23 at line 23 of Class/MOP/Class.pm # once (28µs+1µs) by Class::MOP::Attribute::BEGIN@15 at line 15 of Class/MOP/Attribute.pm # once (28µs+1µs) by Mentat::Storage::Mongo::BEGIN@157 at line 157 of Mentat/Storage/Mongo.pm # once (27µs+1µs) by Class::MOP::Method::Constructor::BEGIN@14 at line 14 of Class/MOP/Method/Constructor.pm # once (28µs+900ns) by Moose::Meta::Class::BEGIN@15 at line 15 of Moose/Meta/Class.pm # once (27µs+2µs) by Mentat::Storage::Mongo::BEGIN@154 at line 154 of Mentat/Storage/Mongo.pm # once (27µs+1µs) by Class::MOP::Method::Accessor::BEGIN@14 at line 14 of Class/MOP/Method/Accessor.pm # once (27µs+1µs) by Moose::Meta::Attribute::BEGIN@17 at line 17 of Moose/Meta/Attribute.pm # once (27µs+2µs) by MongoDB::MongoClient::BEGIN@31 at line 31 of MongoDB/MongoClient.pm # once (27µs+1000ns) by Class::MOP::Method::Inlined::BEGIN@12 at line 12 of Class/MOP/Method/Inlined.pm # once (27µs+1µs) by Class::MOP::Class::Immutable::Trait::BEGIN@15 at line 15 of Class/MOP/Class/Immutable/Trait.pm # once (26µs+2µs) by Class::MOP::Mixin::HasMethods::BEGIN@17 at line 17 of Class/MOP/Mixin/HasMethods.pm # once (27µs+1µs) by Class::MOP::Method::Wrapped::BEGIN@13 at line 13 of Class/MOP/Method/Wrapped.pm # once (27µs+1µs) by Class::MOP::Method::Generated::BEGIN@14 at line 14 of Class/MOP/Method/Generated.pm # once (27µs+1µs) by Moose::Meta::Method::Delegation::BEGIN@14 at line 14 of Moose/Meta/Method/Delegation.pm # once (27µs+1000ns) by Class::MOP::Method::BEGIN@13 at line 13 of Class/MOP/Method.pm # once (26µs+1µs) by Class::MOP::BEGIN@17 at line 17 of Class/MOP.pm # once (26µs+1µs) by Class::MOP::Class::Immutable::Trait::BEGIN@14 at line 14 of Class/MOP/Class/Immutable/Trait.pm # once (26µs+1µs) by Mail::Sendmail::BEGIN@2 at line 2 of (eval 306)[Mail/Sendmail.pm:64] # once (26µs+1µs) by Moose::Meta::Role::Application::ToRole::BEGIN@13 at line 13 of Moose/Meta/Role/Application/ToRole.pm # once (26µs+1µs) by Moose::Util::BEGIN@20 at line 20 of Moose/Util.pm # once (26µs+1µs) by Moose::Meta::Role::Application::ToClass::BEGIN@13 at line 13 of Moose/Meta/Role/Application/ToClass.pm # once (26µs+1µs) by Class::MOP::Method::Constructor::BEGIN@13 at line 13 of Class/MOP/Method/Constructor.pm # once (26µs+1µs) by Moose::Meta::Class::BEGIN@13 at line 13 of Moose/Meta/Class.pm # once (26µs+1µs) by Moose::Meta::Role::Application::RoleSummation::BEGIN@13 at line 13 of Moose/Meta/Role/Application/RoleSummation.pm # once (26µs+1µs) by Moose::Util::TypeConstraints::BEGIN@12 at line 12 of Moose/Util/TypeConstraints.pm # once (26µs+1µs) by Moose::Util::TypeConstraints::Builtins::BEGIN@12 at line 12 of Moose/Util/TypeConstraints/Builtins.pm # once (26µs+1000ns) by Mail::Sendmail::BEGIN@57 at line 57 of Mail/Sendmail.pm # once (26µs+1µs) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@13 at line 13 of Moose/Meta/TypeConstraint/Parameterized.pm # once (26µs+1µs) by Moose::Meta::Method::Delegation::BEGIN@13 at line 13 of Moose/Meta/Method/Delegation.pm # once (26µs+1µs) by Class::MOP::Method::Overload::BEGIN@13 at line 13 of Class/MOP/Method/Overload.pm # once (25µs+1µs) by Class::MOP::Method::Accessor::BEGIN@13 at line 13 of Class/MOP/Method/Accessor.pm # once (25µs+1µs) by Moose::BEGIN@13 at line 13 of Moose.pm # once (25µs+1µs) by Moose::BEGIN@14 at line 14 of Moose.pm # once (25µs+1µs) by Class::MOP::Class::BEGIN@20 at line 20 of Class/MOP/Class.pm # once (25µs+1µs) by metaclass::BEGIN@13 at line 13 of metaclass.pm # once (25µs+1µs) by Moose::Meta::Role::Composite::BEGIN@13 at line 13 of Moose/Meta/Role/Composite.pm # once (25µs+1µs) by Moose::Meta::TypeConstraint::Parameterizable::BEGIN@17 at line 17 of Moose/Meta/TypeConstraint/Parameterizable.pm # once (25µs+1µs) by Moose::Meta::Object::Trait::BEGIN@10 at line 10 of Moose/Meta/Object/Trait.pm # once (25µs+1µs) by Moose::Meta::TypeCoercion::Union::BEGIN@14 at line 14 of Moose/Meta/TypeCoercion/Union.pm # once (25µs+1µs) by Moose::Meta::TypeConstraint::Registry::BEGIN@14 at line 14 of Moose/Meta/TypeConstraint/Registry.pm # once (26µs+700ns) by Log::Loger::BEGIN@109 at line 109 of Log/Loger.pm # once (25µs+1µs) by Moose::Meta::Role::Application::ToInstance::BEGIN@13 at line 13 of Moose/Meta/Role/Application/ToInstance.pm # once (25µs+1000ns) by Class::MOP::Class::BEGIN@19 at line 19 of Class/MOP/Class.pm # once (25µs+1000ns) by Class::MOP::Mixin::HasAttributes::BEGIN@12 at line 12 of Class/MOP/Mixin/HasAttributes.pm # once (24µs+1µs) by Moose::Meta::Method::Constructor::BEGIN@14 at line 14 of Moose/Meta/Method/Constructor.pm # once (25µs+1µs) by Moose::Meta::Role::BEGIN@13 at line 13 of Moose/Meta/Role.pm # once (25µs+900ns) by Class::MOP::Module::BEGIN@14 at line 14 of Class/MOP/Module.pm # once (24µs+1000ns) by Class::MOP::Method::Meta::BEGIN@13 at line 13 of Class/MOP/Method/Meta.pm # once (24µs+1µs) by Moose::Meta::TypeConstraint::Union::BEGIN@16 at line 16 of Moose/Meta/TypeConstraint/Union.pm # once (24µs+1µs) by Moose::Exporter::BEGIN@18 at line 18 of Moose/Exporter.pm # once (24µs+1µs) by Moose::Exporter::BEGIN@16 at line 16 of Moose/Exporter.pm # once (24µs+1µs) by MongoDB::Collection::BEGIN@28 at line 28 of MongoDB/Collection.pm # once (24µs+1000ns) by Package::DeprecationManager::BEGIN@9 at line 9 of Package/DeprecationManager.pm # once (24µs+1µs) by Log::Writer::Email::BEGIN@69 at line 69 of Log/Writer/Email.pm # once (24µs+1µs) by Moose::Meta::TypeConstraint::Role::BEGIN@14 at line 14 of Moose/Meta/TypeConstraint/Role.pm # once (24µs+1µs) by Moose::Meta::TypeConstraint::BEGIN@22 at line 22 of Moose/Meta/TypeConstraint.pm # once (24µs+800ns) by Mentat::Storage::Mongo::BEGIN@150 at line 150 of Mentat/Storage/Mongo.pm # once (24µs+1µs) by MongoDB::Database::BEGIN@27 at line 27 of MongoDB/Database.pm # once (24µs+700ns) by Class::MOP::Class::BEGIN@24 at line 24 of Class/MOP/Class.pm # once (24µs+1µs) by MongoDB::DBRef::BEGIN@26 at line 26 of MongoDB/DBRef.pm # once (24µs+800ns) by Class::MOP::Object::BEGIN@14 at line 14 of Class/MOP/Object.pm # once (23µs+1µs) by Moose::Meta::TypeConstraint::BEGIN@19 at line 19 of Moose/Meta/TypeConstraint.pm # once (23µs+1µs) by Moose::Meta::TypeConstraint::DuckType::BEGIN@14 at line 14 of Moose/Meta/TypeConstraint/DuckType.pm # once (23µs+1µs) by Class::MOP::Mixin::BEGIN@12 at line 12 of Class/MOP/Mixin.pm # once (23µs+900ns) by Log::Writer::Email::BEGIN@67 at line 67 of Log/Writer/Email.pm # once (23µs+1µs) by Moose::Meta::TypeConstraint::Class::BEGIN@14 at line 14 of Moose/Meta/TypeConstraint/Class.pm # once (23µs+1µs) by Moose::Meta::Role::Attribute::BEGIN@12 at line 12 of Moose/Meta/Role/Attribute.pm # once (23µs+1µs) by Moose::Util::BEGIN@18 at line 18 of Moose/Util.pm # once (23µs+1000ns) by Class::MOP::Object::BEGIN@13 at line 13 of Class/MOP/Object.pm # once (23µs+1µs) by Moose::Util::BEGIN@16 at line 16 of Moose/Util.pm # once (23µs+1µs) by Moose::Exporter::BEGIN@12 at line 12 of Moose/Exporter.pm # once (23µs+1µs) by MongoDB::Connection::BEGIN@33 at line 33 of MongoDB/Connection.pm # once (23µs+900ns) by Moose::Meta::Role::BEGIN@14 at line 14 of Moose/Meta/Role.pm # once (23µs+800ns) by Moose::Meta::Role::Composite::BEGIN@14 at line 14 of Moose/Meta/Role/Composite.pm # once (23µs+900ns) by Log::Writer::Module::BEGIN@62 at line 62 of Log/Writer/Module.pm # once (23µs+900ns) by Log::Writer::File::BEGIN@65 at line 65 of Log/Writer/File.pm # once (22µs+900ns) by Log::Writer::Std::BEGIN@64 at line 64 of Log/Writer/Std.pm # once (23µs+800ns) by Class::MOP::Package::BEGIN@14 at line 14 of Class/MOP/Package.pm # once (22µs+900ns) by Log::Writer::Handle::BEGIN@109 at line 109 of Log/Writer/Handle.pm # once (22µs+800ns) by Class::MOP::Method::Wrapped::BEGIN@14 at line 14 of Class/MOP/Method/Wrapped.pm # once (22µs+800ns) by Class::MOP::Mixin::HasAttributes::BEGIN@13 at line 13 of Class/MOP/Mixin/HasAttributes.pm # once (22µs+900ns) by Mentat::Storage::BEGIN@57 at line 57 of Mentat/Storage.pm # once (22µs+900ns) by Class::MOP::Mixin::HasMethods::BEGIN@16 at line 16 of Class/MOP/Mixin/HasMethods.pm # once (22µs+900ns) by Moose::Util::MetaRole::BEGIN@13 at line 13 of Moose/Util/MetaRole.pm # once (21µs+900ns) by Log::Writer::Syslog::BEGIN@68 at line 68 of Log/Writer/Syslog.pm # once (21µs+800ns) by Moose::Meta::TypeConstraint::DuckType::BEGIN@15 at line 15 of Moose/Meta/TypeConstraint/DuckType.pm # once (21µs+900ns) by Moose::Meta::Attribute::BEGIN@16 at line 16 of Moose/Meta/Attribute.pm # once (21µs+800ns) by Eval::Closure::BEGIN@17 at line 17 of Eval/Closure.pm # once (21µs+800ns) by Moose::Meta::Role::Application::ToInstance::BEGIN@14 at line 14 of Moose/Meta/Role/Application/ToInstance.pm # once (21µs+800ns) by Moose::Meta::Role::BEGIN@15 at line 15 of Moose/Meta/Role.pm # once (21µs+900ns) by Moose::Util::BEGIN@14 at line 14 of Moose/Util.pm # once (21µs+900ns) by metaclass::BEGIN@15 at line 15 of metaclass.pm # once (21µs+800ns) by Moose::Meta::Class::BEGIN@19 at line 19 of Moose/Meta/Class.pm # once (21µs+800ns) by Log::Core::Essentials::BEGIN@68 at line 68 of Log/Core/Essentials.pm # once (21µs+900ns) by Mail::Sendmail::BEGIN@56 at line 56 of Mail/Sendmail.pm # once (21µs+900ns) by Moose::Meta::TypeConstraint::BEGIN@20 at line 20 of Moose/Meta/TypeConstraint.pm # once (20µs+800ns) by Log::Writer::Module::BEGIN@64 at line 64 of Log/Writer/Module.pm # once (20µs+800ns) by metaclass::BEGIN@14 at line 14 of metaclass.pm # once (20µs+900ns) by Moose::Meta::TypeConstraint::BEGIN@21 at line 21 of Moose/Meta/TypeConstraint.pm # once (20µs+800ns) by Moose::BEGIN@15 at line 15 of Moose.pm # once (20µs+900ns) by Moose::Util::MetaRole::BEGIN@14 at line 14 of Moose/Util/MetaRole.pm # once (20µs+900ns) by Moose::Util::MetaRole::BEGIN@17 at line 17 of Moose/Util/MetaRole.pm # once (19µs+800ns) by Moose::Meta::Role::Attribute::BEGIN@13 at line 13 of Moose/Meta/Role/Attribute.pm # once (19µs+800ns) by Moose::Meta::TypeConstraint::BEGIN@23 at line 23 of Moose/Meta/TypeConstraint.pm # once (20µs+700ns) by Class::MOP::Class::BEGIN@22 at line 22 of Class/MOP/Class.pm # once (19µs+800ns) by Sys::Hostname::Long::BEGIN@6 at line 6 of Sys/Hostname/Long.pm # once (19µs+900ns) by Sys::Syslog::BEGIN@7 at line 7 of Sys/Syslog.pm # once (18µs+800ns) by Log::Writer::Handle::BEGIN@112 at line 112 of Log/Writer/Handle.pm # once (18µs+0s) by MongoDB::MongoClient::BEGIN@29 at line 29 of MongoDB/MongoClient.pm # once (18µs+0s) by Readonly::BEGIN@170 at line 170 of Readonly.pm # once (17µs+0s) by Moose::Meta::TypeConstraint::Class::BEGIN@13 at line 13 of Moose/Meta/TypeConstraint/Class.pm # once (16µs+0s) by MongoDB::Connection::BEGIN@31 at line 31 of MongoDB/Connection.pm # once (16µs+0s) by JSON::XS::BEGIN@121 at line 121 of JSON/XS.pm # once (16µs+0s) by MongoDB::GridFS::BEGIN@28 at line 28 of MongoDB/GridFS.pm # once (15µs+0s) by Moose::Meta::TypeConstraint::DuckType::BEGIN@13 at line 13 of Moose/Meta/TypeConstraint/DuckType.pm # once (15µs+0s) by Moose::Meta::TypeConstraint::Role::BEGIN@13 at line 13 of Moose/Meta/TypeConstraint/Role.pm # once (15µs+0s) by Moose::Meta::TypeConstraint::Enum::BEGIN@13 at line 13 of Moose/Meta/TypeConstraint/Enum.pm # once (7µs+0s) by Eval::Closure::BEGIN@12 at line 12 of Eval/Closure.pm
sub import {
29677115.2ms my $pkg = shift;
30 my $callpkg = caller($ExportLevel);
31
32 if ($pkg eq "Exporter" and @_ and $_[0] eq "import") {
33 *{$callpkg."::import"} = \&import;
34 return;
35 }
36
37 # We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-(
38 my $exports = \@{"$pkg\::EXPORT"};
39 # But, avoid creating things if they don't exist, which saves a couple of
40 # hundred bytes per package processed.
41 my $fail = ${$pkg . '::'}{EXPORT_FAIL} && \@{"$pkg\::EXPORT_FAIL"};
42 return export $pkg, $callpkg, @_
43 if $Verbose or $Debug or $fail && @$fail > 1;
44 my $export_cache = ($Cache{$pkg} ||= {});
45 my $args = @_ or @_ = @$exports;
46
47 local $_;
48 if ($args and not %$export_cache) {
49 s/^&//, $export_cache->{$_} = 1
501210508µs foreach (@$exports, @{"$pkg\::EXPORT_OK"});
# spent 508µs making 1210 calls to Exporter::CORE:subst, avg 420ns/call
51 }
52 my $heavy;
53 # Try very hard not to use {} and hence have to enter scope on the foreach
54 # We bomb out of the loop with last as soon as heavy is set.
55 if ($args or $fail) {
56 ($heavy = (/\W/ or $args and not exists $export_cache->{$_}
57 or $fail and @$fail and $_ eq $fail->[0])) and last
58437329µs foreach (@_);
# spent 329µs making 437 calls to Exporter::CORE:match, avg 754ns/call
59 } else {
60 ($heavy = /\W/) and last
61416145µs foreach (@_);
# spent 145µs making 416 calls to Exporter::CORE:match, avg 349ns/call
62 }
63698µs return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
# spent 98µs making 6 calls to Exporter::export, avg 16µs/call
64 local $SIG{__WARN__} =
65 sub {require Carp; &Carp::carp} if not $SIG{__WARN__};
66 # shortcut for the common case of no type character
67 *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;
68}
69
70# Default methods
71
72sub export_fail {
73 my $self = shift;
74 @_;
75}
76
77# Unfortunately, caller(1)[3] "does not work" if the caller is aliased as
78# *name = \&foo. Thus the need to create a lot of identical subroutines
79# Otherwise we could have aliased them to export().
80
81
# spent 3.28ms (27µs+3.25) within Exporter::export_to_level which was called 4 times, avg 821µs/call: # 2 times (15µs+3.22ms) by Time::HiRes::import at line 62 of Time/HiRes.pm, avg 1.62ms/call # once (9µs+25µs) by bigint::import at line 272 of bigint.pm # once (3µs+11µs) by JSON::import at line 111 of JSON.pm
sub export_to_level {
82838µs83.85ms goto &{as_heavy()};
# spent 3.25ms making 4 calls to Exporter::as_heavy, avg 814µs/call # spent 596µs making 4 calls to Exporter::Heavy::heavy_export_to_level, avg 149µs/call
83}
84
85sub export_tags {
86 goto &{as_heavy()};
87}
88
89sub export_ok_tags {
90 goto &{as_heavy()};
91}
92
93sub require_version {
94 goto &{as_heavy()};
95}
96
97110µs1;
98__END__
 
# spent 475µs within Exporter::CORE:match which was called 853 times, avg 556ns/call: # 437 times (329µs+0s) by Exporter::import at line 58, avg 754ns/call # 416 times (145µs+0s) by Exporter::import at line 61, avg 349ns/call
sub Exporter::CORE:match; # opcode
# spent 557µs within Exporter::CORE:subst which was called 1224 times, avg 455ns/call: # 1210 times (508µs+0s) by Exporter::import at line 50, avg 420ns/call # 14 times (49µs+0s) by Exporter::as_heavy at line 20, avg 4µs/call
sub Exporter::CORE:subst; # opcode