| Filename | /home/doy/coding/src/Moose/blib/lib//Moose.pm |
| Statements | Executed 1400 statements in 41.3ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 216 | 109 | 25 | 14.4ms | 4.67s | Moose::has |
| 1 | 1 | 1 | 13.9ms | 92.6ms | Moose::BEGIN@19 |
| 1 | 1 | 1 | 12.5ms | 86.3ms | Moose::BEGIN@27 |
| 1 | 1 | 1 | 11.9ms | 441ms | Moose::BEGIN@15 |
| 1 | 1 | 1 | 7.12ms | 7.27ms | Moose::BEGIN@3 |
| 1 | 1 | 1 | 6.65ms | 45.9ms | Moose::BEGIN@20 |
| 25 | 1 | 1 | 5.86ms | 339ms | Moose::init_meta |
| 1 | 1 | 1 | 5.65ms | 11.3ms | Moose::BEGIN@30 |
| 1 | 1 | 1 | 5.60ms | 10.8ms | Moose::BEGIN@11 |
| 1 | 1 | 1 | 4.29ms | 12.9ms | Moose::BEGIN@31 |
| 1 | 1 | 1 | 3.75ms | 22.8ms | Moose::BEGIN@25 |
| 1 | 1 | 1 | 3.49ms | 6.94ms | Moose::BEGIN@32 |
| 1 | 1 | 1 | 3.20ms | 13.2ms | Moose::BEGIN@28 |
| 1 | 1 | 1 | 2.62ms | 422ms | Moose::BEGIN@21 |
| 1 | 1 | 1 | 2.60ms | 9.79ms | Moose::BEGIN@29 |
| 1 | 1 | 1 | 1.57ms | 1.83ms | Moose::BEGIN@12 |
| 1 | 1 | 1 | 1.51ms | 8.69ms | Moose::BEGIN@38 |
| 1 | 1 | 1 | 1.47ms | 7.07ms | Moose::BEGIN@33 |
| 1 | 1 | 1 | 1.43ms | 1.59ms | Moose::BEGIN@2 |
| 1 | 1 | 1 | 985µs | 45.8ms | Moose::BEGIN@14 |
| 1 | 1 | 1 | 973µs | 10.6ms | Moose::BEGIN@23 |
| 26 | 14 | 14 | 805µs | 1.88s | Moose::with (recurses: max depth 1, inclusive time 26.4ms) |
| 1 | 1 | 1 | 141µs | 141µs | Moose::BEGIN@5 |
| 2 | 2 | 2 | 89µs | 11.2ms | Moose::extends |
| 2 | 2 | 2 | 76µs | 3.22ms | Moose::before |
| 1 | 1 | 1 | 51µs | 108µs | Moose::BEGIN@17 |
| 1 | 1 | 1 | 45µs | 8.31ms | Moose::BEGIN@35 |
| 1 | 1 | 1 | 28µs | 28µs | Moose::BEGIN@22 |
| 1 | 1 | 1 | 24µs | 24µs | Moose::BEGIN@36 |
| 0 | 0 | 0 | 0s | 0s | Moose::_get_caller |
| 0 | 0 | 0 | 0s | 0s | Moose::after |
| 0 | 0 | 0 | 0s | 0s | Moose::around |
| 0 | 0 | 0 | 0s | 0s | Moose::augment |
| 0 | 0 | 0 | 0s | 0s | Moose::inner |
| 0 | 0 | 0 | 0s | 0s | Moose::override |
| 0 | 0 | 0 | 0s | 0s | Moose::super |
| 0 | 0 | 0 | 0s | 0s | Moose::throw_error |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Moose; | ||||
| 2 | 3 | 1.31ms | 2 | 1.62ms | # spent 1.59ms (1.43+167µs) within Moose::BEGIN@2 which was called:
# once (1.43ms+167µs) by KiokuDB::BEGIN@4 at line 2 # spent 1.59ms making 1 call to Moose::BEGIN@2
# spent 22µs making 1 call to strict::import |
| 3 | 3 | 6.79ms | 2 | 7.35ms | # spent 7.27ms (7.12+148µs) within Moose::BEGIN@3 which was called:
# once (7.12ms+148µs) by KiokuDB::BEGIN@4 at line 3 # spent 7.27ms making 1 call to Moose::BEGIN@3
# spent 77µs making 1 call to warnings::import |
| 4 | |||||
| 5 | 3 | 313µs | 1 | 141µs | # spent 141µs within Moose::BEGIN@5 which was called:
# once (141µs+0s) by KiokuDB::BEGIN@4 at line 5 # spent 141µs making 1 call to Moose::BEGIN@5 |
| 6 | |||||
| 7 | 1 | 4µs | our $VERSION = '1.19'; | ||
| 8 | 1 | 76µs | $VERSION = eval $VERSION; # spent 76µs executing statements in string eval | ||
| 9 | 1 | 4µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 10 | |||||
| 11 | 3 | 757µs | 2 | 11.1ms | # spent 10.8ms (5.60+5.16) within Moose::BEGIN@11 which was called:
# once (5.60ms+5.16ms) by KiokuDB::BEGIN@4 at line 11 # spent 10.8ms making 1 call to Moose::BEGIN@11
# spent 361µs making 1 call to Exporter::import |
| 12 | 3 | 1.56ms | 2 | 2.09ms | # spent 1.83ms (1.57+256µs) within Moose::BEGIN@12 which was called:
# once (1.57ms+256µs) by KiokuDB::BEGIN@4 at line 12 # spent 1.83ms making 1 call to Moose::BEGIN@12
# spent 256µs making 1 call to Exporter::import |
| 13 | |||||
| 14 | 3 | 469µs | 2 | 45.8ms | # spent 45.8ms (985µs+44.8) within Moose::BEGIN@14 which was called:
# once (985µs+44.8ms) by KiokuDB::BEGIN@4 at line 14 # spent 45.8ms making 1 call to Moose::BEGIN@14
# spent 35µs making 1 call to Package::DeprecationManager::__ANON__[Package/DeprecationManager.pm:61] |
| 15 | 3 | 468µs | 2 | 442ms | # spent 441ms (11.9+429) within Moose::BEGIN@15 which was called:
# once (11.9ms+429ms) by KiokuDB::BEGIN@4 at line 15 # spent 441ms making 1 call to Moose::BEGIN@15
# spent 140µs making 1 call to Moose::Exporter::import |
| 16 | |||||
| 17 | 3 | 173µs | 2 | 166µs | # spent 108µs (51+57) within Moose::BEGIN@17 which was called:
# once (51µs+57µs) by KiokuDB::BEGIN@4 at line 17 # spent 108µs making 1 call to Moose::BEGIN@17
# spent 57µs making 1 call to UNIVERSAL::VERSION |
| 18 | |||||
| 19 | 3 | 513µs | 1 | 92.6ms | # spent 92.6ms (13.9+78.7) within Moose::BEGIN@19 which was called:
# once (13.9ms+78.7ms) by KiokuDB::BEGIN@4 at line 19 # spent 92.6ms making 1 call to Moose::BEGIN@19 |
| 20 | 3 | 511µs | 1 | 45.9ms | # spent 45.9ms (6.65+39.3) within Moose::BEGIN@20 which was called:
# once (6.65ms+39.3ms) by KiokuDB::BEGIN@4 at line 20 # spent 45.9ms making 1 call to Moose::BEGIN@20 |
| 21 | 3 | 502µs | 1 | 422ms | # spent 422ms (2.62+419) within Moose::BEGIN@21 which was called:
# once (2.62ms+419ms) by KiokuDB::BEGIN@4 at line 21 # spent 422ms making 1 call to Moose::BEGIN@21 |
| 22 | 3 | 88µs | 1 | 28µs | # spent 28µs within Moose::BEGIN@22 which was called:
# once (28µs+0s) by KiokuDB::BEGIN@4 at line 22 # spent 28µs making 1 call to Moose::BEGIN@22 |
| 23 | 3 | 548µs | 1 | 10.6ms | # spent 10.6ms (973µs+9.59) within Moose::BEGIN@23 which was called:
# once (973µs+9.59ms) by KiokuDB::BEGIN@4 at line 23 # spent 10.6ms making 1 call to Moose::BEGIN@23 |
| 24 | |||||
| 25 | 3 | 572µs | 1 | 22.8ms | # spent 22.8ms (3.75+19.1) within Moose::BEGIN@25 which was called:
# once (3.75ms+19.1ms) by KiokuDB::BEGIN@4 at line 25 # spent 22.8ms making 1 call to Moose::BEGIN@25 |
| 26 | |||||
| 27 | 3 | 510µs | 1 | 86.3ms | # spent 86.3ms (12.5+73.8) within Moose::BEGIN@27 which was called:
# once (12.5ms+73.8ms) by KiokuDB::BEGIN@4 at line 27 # spent 86.3ms making 1 call to Moose::BEGIN@27 |
| 28 | 3 | 579µs | 1 | 13.2ms | # spent 13.2ms (3.20+9.99) within Moose::BEGIN@28 which was called:
# once (3.20ms+9.99ms) by KiokuDB::BEGIN@4 at line 28 # spent 13.2ms making 1 call to Moose::BEGIN@28 |
| 29 | 3 | 908µs | 1 | 9.79ms | # spent 9.79ms (2.60+7.19) within Moose::BEGIN@29 which was called:
# once (2.60ms+7.19ms) by KiokuDB::BEGIN@4 at line 29 # spent 9.79ms making 1 call to Moose::BEGIN@29 |
| 30 | 3 | 544µs | 1 | 11.3ms | # spent 11.3ms (5.65+5.67) within Moose::BEGIN@30 which was called:
# once (5.65ms+5.67ms) by KiokuDB::BEGIN@4 at line 30 # spent 11.3ms making 1 call to Moose::BEGIN@30 |
| 31 | 3 | 488µs | 1 | 12.9ms | # spent 12.9ms (4.29+8.56) within Moose::BEGIN@31 which was called:
# once (4.29ms+8.56ms) by KiokuDB::BEGIN@4 at line 31 # spent 12.9ms making 1 call to Moose::BEGIN@31 |
| 32 | 3 | 507µs | 1 | 6.94ms | # spent 6.94ms (3.49+3.45) within Moose::BEGIN@32 which was called:
# once (3.49ms+3.45ms) by KiokuDB::BEGIN@4 at line 32 # spent 6.94ms making 1 call to Moose::BEGIN@32 |
| 33 | 3 | 484µs | 1 | 7.07ms | # spent 7.07ms (1.47+5.60) within Moose::BEGIN@33 which was called:
# once (1.47ms+5.60ms) by KiokuDB::BEGIN@4 at line 33 # spent 7.07ms making 1 call to Moose::BEGIN@33 |
| 34 | |||||
| 35 | 3 | 151µs | 2 | 16.6ms | # spent 8.31ms (45µs+8.27) within Moose::BEGIN@35 which was called:
# once (45µs+8.27ms) by KiokuDB::BEGIN@4 at line 35 # spent 8.31ms making 1 call to Moose::BEGIN@35
# spent 8.27ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 36 | 3 | 88µs | 1 | 24µs | # spent 24µs within Moose::BEGIN@36 which was called:
# once (24µs+0s) by KiokuDB::BEGIN@4 at line 36 # spent 24µs making 1 call to Moose::BEGIN@36 |
| 37 | |||||
| 38 | 3 | 4.93ms | 1 | 8.69ms | # spent 8.69ms (1.51+7.18) within Moose::BEGIN@38 which was called:
# once (1.51ms+7.18ms) by KiokuDB::BEGIN@4 at line 38 # spent 8.69ms making 1 call to Moose::BEGIN@38 |
| 39 | |||||
| 40 | sub throw_error { | ||||
| 41 | # FIXME This | ||||
| 42 | shift; | ||||
| 43 | goto \&confess | ||||
| 44 | } | ||||
| 45 | |||||
| 46 | # spent 11.2ms (89µs+11.1) within Moose::extends which was called 2 times, avg 5.58ms/call:
# once (50µs+5.59ms) by KiokuDB::BEGIN@11 at line 24 of KiokuDB/Collapser.pm
# once (40µs+5.49ms) by Moose::extends at line 359 of Moose/Exporter.pm | ||||
| 47 | 1 | 3µs | my $meta = shift; | ||
| 48 | |||||
| 49 | 1 | 2µs | Moose->throw_error("Must derive at least one class") unless @_; | ||
| 50 | |||||
| 51 | # this checks the metaclass to make sure | ||||
| 52 | # it is correct, sometimes it can get out | ||||
| 53 | # of sync when the classes are being built | ||||
| 54 | 1 | 28µs | 1 | 5.49ms | $meta->superclasses(@_); # spent 5.49ms making 1 call to Moose::Meta::Class::superclasses |
| 55 | } | ||||
| 56 | |||||
| 57 | # spent 1.88s (805µs+1.88) within Moose::with which was called 26 times, avg 72.2ms/call:
# 13 times (280µs+924ms) by Moose::with at line 359 of Moose/Exporter.pm, avg 71.1ms/call
# once (41µs+292ms) by KiokuDB::TypeMap::Resolver::BEGIN@9 at line 21 of KiokuDB/TypeMap/Entry/MOP.pm
# once (50µs+217ms) by KiokuDB::BEGIN@17 at line 56 of KiokuDB/Stream/Objects.pm
# once (45µs+196ms) by KiokuDB::Collapser::BEGIN@12 at line 10 of KiokuDB/Entry.pm
# once (37µs+66.7ms) by KiokuDB::BEGIN@11 at line 26 of KiokuDB/Collapser.pm
# once (37µs+58.9ms) by KiokuDB::Collapser::BEGIN@16 at line 8 of KiokuDB/Error/UnknownObjects.pm
# once (38µs+45.4ms) by main::BEGIN@0 at line 246 of KiokuDB.pm
# once (50µs+26.2ms) by KiokuDB::BEGIN@14 at line 14 of KiokuDB/TypeMap.pm
# once (37µs+12.9ms) by KiokuDB::Linker::BEGIN@18 at line 8 of KiokuDB/Error/MissingObjects.pm
# once (38µs+12.0ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 14 of Data/Stream/Bulk/Cat.pm
# once (39µs+8.29ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 29 of Data/Stream/Bulk/Filter.pm
# once (37µs+6.30ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 14 of Data/Stream/Bulk/Nil.pm
# once (37µs+4.71ms) by KiokuDB::Collapser::BEGIN@14 at line 8 of KiokuDB/Reference.pm
# once (37µs+4.19ms) by KiokuDB::BEGIN@15 at line 8 of KiokuDB/TypeMap/Shadow.pm | ||||
| 58 | 13 | 289µs | 13 | 924ms | Moose::Util::apply_all_roles(shift, @_); # spent 950ms making 13 calls to Moose::Util::apply_all_roles, avg 73.1ms/call, recursion: max depth 1, sum of overlapping time 26.3ms |
| 59 | } | ||||
| 60 | |||||
| 61 | # spent 4.67s (14.4ms+4.66) within Moose::has which was called 216 times, avg 21.6ms/call:
# 108 times (10.0ms+2.32s) by Moose::has at line 359 of Moose/Exporter.pm, avg 21.6ms/call
# once (41µs+567ms) by KiokuDB::LiveObjects::BEGIN@13 at line 12 of KiokuDB/LiveObjects/Scope.pm
# once (40µs+371ms) by KiokuDB::Collapser::BEGIN@15 at line 61 of KiokuDB/Collapser/Buffer.pm
# once (37µs+46.2ms) by KiokuDB::Collapser::BEGIN@12 at line 100 of KiokuDB/Entry.pm
# once (43µs+35.3ms) by KiokuDB::BEGIN@14 at line 25 of KiokuDB/TypeMap.pm
# once (40µs+33.2ms) by KiokuDB::TypeMap::Entry::Std::BEGIN@6 at line 8 of KiokuDB/TypeMap/Entry/Compiled.pm
# once (45µs+31.8ms) by KiokuDB::BEGIN@14 at line 16 of KiokuDB/TypeMap.pm
# once (42µs+24.0ms) by KiokuDB::BEGIN@13 at line 49 of KiokuDB/LiveObjects.pm
# once (55µs+24.0ms) by KiokuDB::BEGIN@14 at line 31 of KiokuDB/TypeMap.pm
# once (52µs+23.7ms) by KiokuDB::BEGIN@14 at line 37 of KiokuDB/TypeMap.pm
# once (49µs+22.5ms) by KiokuDB::Collapser::BEGIN@12 at line 12 of KiokuDB/Entry.pm
# once (38µs+22.4ms) by KiokuDB::TypeMap::Resolver::BEGIN@9 at line 44 of KiokuDB/TypeMap/Entry/MOP.pm
# once (38µs+22.3ms) by KiokuDB::Collapser::BEGIN@12 at line 172 of KiokuDB/Entry.pm
# once (39µs+22.3ms) by main::BEGIN@0 at line 152 of KiokuDB.pm
# once (39µs+22.1ms) by KiokuDB::Collapser::BEGIN@12 at line 129 of KiokuDB/Entry.pm
# once (37µs+19.8ms) by KiokuDB::Collapser::BEGIN@12 at line 20 of KiokuDB/Entry.pm
# once (40µs+19.3ms) by main::BEGIN@0 at line 172 of KiokuDB.pm
# once (39µs+18.3ms) by main::BEGIN@0 at line 77 of KiokuDB.pm
# once (45µs+18.2ms) by KiokuDB::Collapser::BEGIN@12 at line 62 of KiokuDB/Entry.pm
# once (41µs+17.7ms) by KiokuDB::BEGIN@13 at line 155 of KiokuDB/LiveObjects.pm
# once (43µs+17.6ms) by KiokuDB::BEGIN@17 at line 21 of KiokuDB/Stream/Objects.pm
# once (39µs+17.1ms) by main::BEGIN@0 at line 221 of KiokuDB.pm
# once (38µs+17.0ms) by KiokuDB::BEGIN@11 at line 55 of KiokuDB/Collapser.pm
# once (44µs+16.9ms) by main::BEGIN@0 at line 192 of KiokuDB.pm
# once (50µs+16.8ms) by KiokuDB::BEGIN@12 at line 22 of KiokuDB/Linker.pm
# once (38µs+16.8ms) by main::BEGIN@0 at line 154 of KiokuDB.pm
# once (39µs+16.7ms) by KiokuDB::BEGIN@13 at line 240 of KiokuDB/LiveObjects.pm
# once (37µs+16.7ms) by KiokuDB::TypeMap::Entry::MOP::BEGIN@9 at line 24 of KiokuDB/Thunk.pm
# once (39µs+16.7ms) by KiokuDB::BEGIN@17 at line 33 of KiokuDB/Stream/Objects.pm
# once (39µs+16.5ms) by KiokuDB::BEGIN@11 at line 28 of KiokuDB/Collapser.pm
# once (37µs+16.3ms) by KiokuDB::Collapser::BEGIN@12 at line 83 of KiokuDB/Entry.pm
# once (38µs+16.2ms) by KiokuDB::BEGIN@11 at line 59 of KiokuDB/Collapser.pm
# once (40µs+16.2ms) by KiokuDB::TypeMap::Resolver::BEGIN@9 at line 38 of KiokuDB/TypeMap/Entry/MOP.pm
# once (40µs+16.1ms) by KiokuDB::LiveObjects::BEGIN@1 at line 59 of Devel/PartialDump.pm
# once (38µs+16.1ms) by KiokuDB::Collapser::BEGIN@12 at line 48 of KiokuDB/Entry.pm
# once (42µs+16.0ms) by KiokuDB::LiveObjects::BEGIN@1 at line 52 of Devel/PartialDump.pm
# once (38µs+16.0ms) by KiokuDB::Collapser::BEGIN@12 at line 55 of KiokuDB/Entry.pm
# once (37µs+15.8ms) by KiokuDB::Collapser::BEGIN@12 at line 77 of KiokuDB/Entry.pm
# once (38µs+15.6ms) by main::BEGIN@0 at line 72 of KiokuDB.pm
# once (38µs+15.3ms) by KiokuDB::Collapser::BEGIN@12 at line 71 of KiokuDB/Entry.pm
# once (37µs+15.0ms) by KiokuDB::Collapser::BEGIN@12 at line 42 of KiokuDB/Entry.pm
# once (41µs+14.8ms) by KiokuDB::BEGIN@13 at line 32 of KiokuDB/LiveObjects.pm
# once (42µs+13.4ms) by KiokuDB::Collapser::BEGIN@16 at line 10 of KiokuDB/Error/UnknownObjects.pm
# once (41µs+12.5ms) by KiokuDB::Linker::BEGIN@18 at line 10 of KiokuDB/Error/MissingObjects.pm
# once (41µs+12.4ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 16 of Data/Stream/Bulk/Cat.pm
# once (39µs+12.3ms) by KiokuDB::Collapser::BEGIN@13 at line 20 of KiokuDB/Entry/Skip.pm
# once (42µs+12.2ms) by KiokuDB::BEGIN@15 at line 10 of KiokuDB/TypeMap/Shadow.pm
# once (39µs+12.2ms) by KiokuDB::BEGIN@17 at line 45 of KiokuDB/Stream/Objects.pm
# once (37µs+12.1ms) by KiokuDB::Collapser::BEGIN@13 at line 14 of KiokuDB/Entry/Skip.pm
# once (37µs+12.1ms) by KiokuDB::Collapser::BEGIN@12 at line 36 of KiokuDB/Entry.pm
# once (51µs+11.8ms) by KiokuDB::Collapser::BEGIN@18 at line 27 of Data/Visitor.pm
# once (40µs+11.7ms) by KiokuDB::BEGIN@11 at line 42 of KiokuDB/Collapser.pm
# once (38µs+11.7ms) by KiokuDB::LiveObjects::BEGIN@13 at line 25 of KiokuDB/LiveObjects/Scope.pm
# once (39µs+11.2ms) by KiokuDB::BEGIN@17 at line 14 of KiokuDB/Stream/Objects.pm
# once (38µs+11.1ms) by KiokuDB::BEGIN@12 at line 35 of KiokuDB/Linker.pm
# once (45µs+10.9ms) by KiokuDB::Collapser::BEGIN@18 at line 21 of Data/Visitor.pm
# once (40µs+10.5ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 22 of Data/Stream/Bulk/Filter.pm
# once (49µs+10.2ms) by KiokuDB::TypeMap::Resolver::BEGIN@9 at line 28 of KiokuDB/TypeMap/Entry/MOP.pm
# once (41µs+10.1ms) by KiokuDB::Collapser::BEGIN@15 at line 9 of KiokuDB/Collapser/Buffer.pm
# once (39µs+10.0ms) by KiokuDB::Collapser::BEGIN@13 at line 8 of KiokuDB/Entry/Skip.pm
# once (40µs+10.0ms) by KiokuDB::BEGIN@12 at line 52 of KiokuDB/Linker.pm
# once (45µs+10.00ms) by KiokuDB::BEGIN@17 at line 51 of KiokuDB/Stream/Objects.pm
# once (39µs+9.31ms) by main::BEGIN@0 at line 67 of KiokuDB.pm
# once (39µs+9.26ms) by KiokuDB::LiveObjects::BEGIN@1 at line 86 of Devel/PartialDump.pm
# once (39µs+9.17ms) by main::BEGIN@0 at line 215 of KiokuDB.pm
# once (39µs+9.02ms) by KiokuDB::BEGIN@13 at line 167 of KiokuDB/LiveObjects.pm
# once (38µs+8.92ms) by KiokuDB::BEGIN@11 at line 49 of KiokuDB/Collapser.pm
# once (42µs+8.89ms) by KiokuDB::BEGIN@13 at line 22 of KiokuDB/LiveObjects.pm
# once (39µs+8.89ms) by KiokuDB::LiveObjects::BEGIN@1 at line 98 of Devel/PartialDump.pm
# once (39µs+8.83ms) by KiokuDB::LiveObjects::BEGIN@1 at line 67 of Devel/PartialDump.pm
# once (39µs+8.82ms) by KiokuDB::LiveObjects::BEGIN@1 at line 92 of Devel/PartialDump.pm
# once (40µs+8.75ms) by KiokuDB::Collapser::BEGIN@14 at line 10 of KiokuDB/Reference.pm
# once (38µs+8.75ms) by KiokuDB::LiveObjects::BEGIN@1 at line 80 of Devel/PartialDump.pm
# once (39µs+8.74ms) by KiokuDB::Collapser::BEGIN@15 at line 101 of KiokuDB/Collapser/Buffer.pm
# once (53µs+8.69ms) by KiokuDB::LiveObjects::BEGIN@1 at line 74 of Devel/PartialDump.pm
# once (41µs+8.54ms) by KiokuDB::BEGIN@11 at line 30 of KiokuDB/Collapser.pm
# once (43µs+8.52ms) by main::BEGIN@0 at line 62 of KiokuDB.pm
# once (40µs+8.51ms) by KiokuDB::BEGIN@13 at line 27 of KiokuDB/LiveObjects.pm
# once (37µs+8.49ms) by KiokuDB::Collapser::BEGIN@14 at line 16 of KiokuDB/Reference.pm
# once (38µs+8.34ms) by KiokuDB::TypeMap::Entry::MOP::BEGIN@9 at line 19 of KiokuDB/Thunk.pm
# once (38µs+8.30ms) by main::BEGIN@0 at line 208 of KiokuDB.pm
# once (43µs+8.29ms) by KiokuDB::BEGIN@13 at line 57 of KiokuDB/LiveObjects.pm
# once (39µs+8.26ms) by KiokuDB::TypeMap::Resolver::BEGIN@9 at line 46 of KiokuDB/TypeMap/Entry/MOP.pm
# once (38µs+8.11ms) by KiokuDB::Collapser::BEGIN@15 at line 107 of KiokuDB/Collapser/Buffer.pm
# once (41µs+8.07ms) by KiokuDB::BEGIN@13 at line 38 of KiokuDB/LiveObjects.pm
# once (40µs+8.07ms) by KiokuDB::BEGIN@12 at line 58 of KiokuDB/Linker.pm
# once (42µs+8.06ms) by KiokuDB::Collapser::BEGIN@15 at line 93 of KiokuDB/Collapser/Buffer.pm
# once (38µs+8.04ms) by KiokuDB::Collapser::BEGIN@15 at line 19 of KiokuDB/Collapser/Buffer.pm
# once (39µs+8.03ms) by KiokuDB::BEGIN@11 at line 36 of KiokuDB/Collapser.pm
# once (39µs+8.01ms) by KiokuDB::BEGIN@12 at line 29 of KiokuDB/Linker.pm
# once (38µs+8.00ms) by KiokuDB::Collapser::BEGIN@15 at line 76 of KiokuDB/Collapser/Buffer.pm
# once (39µs+7.99ms) by KiokuDB::TypeMap::Entry::Std::BEGIN@6 at line 14 of KiokuDB/TypeMap/Entry/Compiled.pm
# once (39µs+7.98ms) by KiokuDB::TypeMap::Entry::Std::BEGIN@6 at line 20 of KiokuDB/TypeMap/Entry/Compiled.pm
# once (41µs+7.96ms) by KiokuDB::BEGIN@17 at line 8 of KiokuDB/Stream/Objects.pm
# once (38µs+7.95ms) by main::BEGIN@0 at line 142 of KiokuDB.pm
# once (39µs+7.94ms) by KiokuDB::BEGIN@16 at line 28 of KiokuDB/TypeMap/Resolver.pm
# once (40µs+7.94ms) by KiokuDB::BEGIN@16 at line 22 of KiokuDB/TypeMap/Resolver.pm
# once (38µs+7.94ms) by KiokuDB::BEGIN@12 at line 42 of KiokuDB/Linker.pm
# once (40µs+7.93ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 16 of Data/Stream/Bulk/Filter.pm
# once (40µs+7.90ms) by KiokuDB::BEGIN@16 at line 13 of KiokuDB/TypeMap/Resolver.pm
# once (39µs+7.89ms) by KiokuDB::LiveObjects::BEGIN@13 at line 20 of KiokuDB/LiveObjects/Scope.pm
# once (38µs+7.89ms) by KiokuDB::Collapser::BEGIN@15 at line 44 of KiokuDB/Collapser/Buffer.pm
# once (42µs+7.87ms) by KiokuDB::LiveObjects::BEGIN@14 at line 14 of KiokuDB/LiveObjects/TXNScope.pm
# once (38µs+7.85ms) by KiokuDB::LiveObjects::BEGIN@14 at line 16 of KiokuDB/LiveObjects/TXNScope.pm
# once (39µs+7.84ms) by KiokuDB::LiveObjects::BEGIN@14 at line 22 of KiokuDB/LiveObjects/TXNScope.pm
# once (41µs+7.77ms) by KiokuDB::TypeMap::Entry::MOP::BEGIN@9 at line 8 of KiokuDB/Thunk.pm
# once (45µs+7.75ms) by KiokuDB::TypeMap::BEGIN@10 at line 8 of KiokuDB/TypeMap/Entry/Alias.pm
# once (38µs+7.73ms) by KiokuDB::TypeMap::Entry::MOP::BEGIN@9 at line 14 of KiokuDB/Thunk.pm
# once (39µs+7.70ms) by KiokuDB::Collapser::BEGIN@15 at line 38 of KiokuDB/Collapser/Buffer.pm | ||||
| 62 | 108 | 382µs | my $meta = shift; | ||
| 63 | 108 | 391µs | my $name = shift; | ||
| 64 | |||||
| 65 | 108 | 538µs | Moose->throw_error('Usage: has \'name\' => ( key => value, ... )') | ||
| 66 | if @_ % 2 == 1; | ||||
| 67 | |||||
| 68 | 108 | 2.42ms | 108 | 4.32ms | my %options = ( definition_context => Moose::Util::_caller_info(), @_ ); # spent 4.32ms making 108 calls to Moose::Util::_caller_info, avg 40µs/call |
| 69 | 108 | 712µs | my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ]; | ||
| 70 | 216 | 5.37ms | 116 | 2.32s | $meta->add_attribute( $_, %options ) for @$attrs; # spent 2.32s making 116 calls to Moose::Meta::Class::add_attribute, avg 20.0ms/call |
| 71 | } | ||||
| 72 | |||||
| 73 | # spent 3.22ms (76µs+3.14) within Moose::before which was called 2 times, avg 1.61ms/call:
# once (50µs+1.61ms) by KiokuDB::BEGIN@17 at line 77 of KiokuDB/Stream/Objects.pm
# once (26µs+1.53ms) by Moose::before at line 359 of Moose/Exporter.pm | ||||
| 74 | 1 | 27µs | 1 | 1.53ms | Moose::Util::add_method_modifier(shift, 'before', \@_); # spent 1.53ms making 1 call to Moose::Util::add_method_modifier |
| 75 | } | ||||
| 76 | |||||
| 77 | sub after { | ||||
| 78 | Moose::Util::add_method_modifier(shift, 'after', \@_); | ||||
| 79 | } | ||||
| 80 | |||||
| 81 | sub around { | ||||
| 82 | Moose::Util::add_method_modifier(shift, 'around', \@_); | ||||
| 83 | } | ||||
| 84 | |||||
| 85 | 1 | 2µs | our $SUPER_PACKAGE; | ||
| 86 | 1 | 2µs | our $SUPER_BODY; | ||
| 87 | 1 | 3µs | our @SUPER_ARGS; | ||
| 88 | |||||
| 89 | sub super { | ||||
| 90 | # This check avoids a recursion loop - see | ||||
| 91 | # t/100_bugs/020_super_recursion.t | ||||
| 92 | return if defined $SUPER_PACKAGE && $SUPER_PACKAGE ne caller(); | ||||
| 93 | return unless $SUPER_BODY; $SUPER_BODY->(@SUPER_ARGS); | ||||
| 94 | } | ||||
| 95 | |||||
| 96 | sub override { | ||||
| 97 | my $meta = shift; | ||||
| 98 | my ( $name, $method ) = @_; | ||||
| 99 | $meta->add_override_method_modifier( $name => $method ); | ||||
| 100 | } | ||||
| 101 | |||||
| 102 | sub inner { | ||||
| 103 | my $pkg = caller(); | ||||
| 104 | our ( %INNER_BODY, %INNER_ARGS ); | ||||
| 105 | |||||
| 106 | if ( my $body = $INNER_BODY{$pkg} ) { | ||||
| 107 | my @args = @{ $INNER_ARGS{$pkg} }; | ||||
| 108 | local $INNER_ARGS{$pkg}; | ||||
| 109 | local $INNER_BODY{$pkg}; | ||||
| 110 | return $body->(@args); | ||||
| 111 | } else { | ||||
| 112 | return; | ||||
| 113 | } | ||||
| 114 | } | ||||
| 115 | |||||
| 116 | sub augment { | ||||
| 117 | my $meta = shift; | ||||
| 118 | my ( $name, $method ) = @_; | ||||
| 119 | $meta->add_augment_method_modifier( $name => $method ); | ||||
| 120 | } | ||||
| 121 | |||||
| 122 | 1 | 37µs | 1 | 4.27ms | Moose::Exporter->setup_import_methods( # spent 4.27ms making 1 call to Moose::Exporter::setup_import_methods |
| 123 | with_meta => [ | ||||
| 124 | qw( extends with has before after around override augment ) | ||||
| 125 | ], | ||||
| 126 | as_is => [ | ||||
| 127 | qw( super inner ), | ||||
| 128 | \&Carp::confess, | ||||
| 129 | \&Scalar::Util::blessed, | ||||
| 130 | ], | ||||
| 131 | ); | ||||
| 132 | |||||
| 133 | # spent 339ms (5.86+333) within Moose::init_meta which was called 25 times, avg 13.5ms/call:
# 25 times (5.86ms+333ms) by Moose::Exporter::__ANON__[/home/doy/coding/src/Moose/blib/lib//Moose/Exporter.pm:456] at line 423 of Moose/Exporter.pm, avg 13.5ms/call | ||||
| 134 | # This used to be called as a function. This hack preserves | ||||
| 135 | # backwards compatibility. | ||||
| 136 | 25 | 80µs | if ( $_[0] ne __PACKAGE__ ) { | ||
| 137 | Moose::Deprecated::deprecated( | ||||
| 138 | feature => 'Moose::init_meta', | ||||
| 139 | message => 'Calling Moose::init_meta as a function is deprecated', | ||||
| 140 | ); | ||||
| 141 | |||||
| 142 | return __PACKAGE__->init_meta( | ||||
| 143 | for_class => $_[0], | ||||
| 144 | base_class => $_[1], | ||||
| 145 | metaclass => $_[2], | ||||
| 146 | ); | ||||
| 147 | } | ||||
| 148 | |||||
| 149 | 25 | 62µs | shift; | ||
| 150 | 25 | 314µs | my %args = @_; | ||
| 151 | |||||
| 152 | 25 | 108µs | my $class = $args{for_class} | ||
| 153 | or Moose->throw_error("Cannot call init_meta without specifying a for_class"); | ||||
| 154 | 25 | 89µs | my $base_class = $args{base_class} || 'Moose::Object'; | ||
| 155 | 25 | 63µs | my $metaclass = $args{metaclass} || 'Moose::Meta::Class'; | ||
| 156 | 25 | 93µs | my $meta_name = exists $args{meta_name} ? $args{meta_name} : 'meta'; | ||
| 157 | |||||
| 158 | 25 | 742µs | 25 | 279µs | Moose->throw_error("The Metaclass $metaclass must be a subclass of Moose::Meta::Class.") # spent 279µs making 25 calls to UNIVERSAL::isa, avg 11µs/call |
| 159 | unless $metaclass->isa('Moose::Meta::Class'); | ||||
| 160 | |||||
| 161 | # make a subtype for each Moose class | ||||
| 162 | 25 | 553µs | 50 | 23.5ms | class_type($class) # spent 21.1ms making 25 calls to Moose::Util::TypeConstraints::class_type, avg 845µs/call
# spent 2.40ms making 25 calls to Moose::Util::TypeConstraints::find_type_constraint, avg 96µs/call |
| 163 | unless find_type_constraint($class); | ||||
| 164 | |||||
| 165 | 25 | 50µs | my $meta; | ||
| 166 | |||||
| 167 | 25 | 428µs | 25 | 309µs | if ( $meta = Class::MOP::get_metaclass_by_name($class) ) { # spent 309µs making 25 calls to Class::MOP::get_metaclass_by_name, avg 12µs/call |
| 168 | unless ( $meta->isa("Moose::Meta::Class") ) { | ||||
| 169 | my $error_message = "$class already has a metaclass, but it does not inherit $metaclass ($meta)."; | ||||
| 170 | if ( $meta->isa('Moose::Meta::Role') ) { | ||||
| 171 | Moose->throw_error($error_message . ' You cannot make the same thing a role and a class. Remove either Moose or Moose::Role.'); | ||||
| 172 | } else { | ||||
| 173 | Moose->throw_error($error_message); | ||||
| 174 | } | ||||
| 175 | } | ||||
| 176 | } else { | ||||
| 177 | # no metaclass | ||||
| 178 | |||||
| 179 | # now we check whether our ancestors have metaclass, and if so borrow that | ||||
| 180 | 25 | 827µs | 25 | 452µs | my ( undef, @isa ) = @{ mro::get_linear_isa($class) }; # spent 452µs making 25 calls to mro::get_linear_isa, avg 18µs/call |
| 181 | |||||
| 182 | 25 | 167µs | foreach my $ancestor ( @isa ) { | ||
| 183 | my $ancestor_meta = Class::MOP::get_metaclass_by_name($ancestor) || next; | ||||
| 184 | |||||
| 185 | my $ancestor_meta_class = $ancestor_meta->_real_ref_name; | ||||
| 186 | |||||
| 187 | # if we have an ancestor metaclass that inherits $metaclass, we use | ||||
| 188 | # that. This is like _fix_metaclass_incompatibility, but we can do it now. | ||||
| 189 | |||||
| 190 | # the case of having an ancestry is not very common, but arises in | ||||
| 191 | # e.g. Reaction | ||||
| 192 | unless ( $metaclass->isa( $ancestor_meta_class ) ) { | ||||
| 193 | if ( $ancestor_meta_class->isa($metaclass) ) { | ||||
| 194 | $metaclass = $ancestor_meta_class; | ||||
| 195 | } | ||||
| 196 | } | ||||
| 197 | } | ||||
| 198 | |||||
| 199 | 25 | 397µs | 25 | 100ms | $meta = $metaclass->initialize($class); # spent 100ms making 25 calls to Moose::Meta::Class::initialize, avg 4.00ms/call |
| 200 | } | ||||
| 201 | |||||
| 202 | 25 | 278µs | if (defined $meta_name) { | ||
| 203 | # also check for inherited non moose 'meta' method? | ||||
| 204 | 25 | 357µs | 25 | 4.15ms | my $existing = $meta->get_method($meta_name); # spent 4.15ms making 25 calls to Class::MOP::Mixin::HasMethods::get_method, avg 166µs/call |
| 205 | 25 | 54µs | if ($existing && !$existing->isa('Class::MOP::Method::Meta')) { | ||
| 206 | Carp::cluck "Moose is overwriting an existing method named " | ||||
| 207 | . "$meta_name in class $class with a method " | ||||
| 208 | . "which returns the class's metaclass. If this is " | ||||
| 209 | . "actually what you want, you should remove the " | ||||
| 210 | . "existing method, otherwise, you should rename or " | ||||
| 211 | . "disable this generated method using the " | ||||
| 212 | . "'-meta_name' option to 'use Moose'."; | ||||
| 213 | } | ||||
| 214 | 25 | 339µs | 25 | 65.4ms | $meta->_add_meta_method($meta_name); # spent 65.4ms making 25 calls to Class::MOP::Mixin::HasMethods::_add_meta_method, avg 2.62ms/call |
| 215 | } | ||||
| 216 | |||||
| 217 | # make sure they inherit from Moose::Object | ||||
| 218 | 25 | 605µs | 50 | 139ms | $meta->superclasses($base_class) # spent 139ms making 50 calls to Moose::Meta::Class::superclasses, avg 2.77ms/call |
| 219 | unless $meta->superclasses(); | ||||
| 220 | |||||
| 221 | 25 | 467µs | return $meta; | ||
| 222 | } | ||||
| 223 | |||||
| 224 | # This may be used in some older MooseX extensions. | ||||
| 225 | sub _get_caller { | ||||
| 226 | goto &Moose::Exporter::_get_caller; | ||||
| 227 | } | ||||
| 228 | |||||
| 229 | ## make 'em all immutable | ||||
| 230 | |||||
| 231 | 22 | 200µs | 22 | 141µs | $_->make_immutable( # spent 141µs making 22 calls to Class::MOP::Class::is_mutable, avg 6µs/call |
| 232 | inline_constructor => 1, | ||||
| 233 | constructor_name => "_new", | ||||
| 234 | # these are Class::MOP accessors, so they need inlining | ||||
| 235 | inline_accessors => 1 | ||||
| 236 | 23 | 893µs | 44 | 418ms | ) for grep { $_->is_mutable } # spent 405ms making 22 calls to Class::MOP::Class::make_immutable, avg 18.4ms/call
# spent 12.0ms making 10 calls to Class::MOP::Object::meta, avg 1.20ms/call
# spent 144µs making 2 calls to Moose::Meta::Role::Method::Required::meta, avg 72µs/call
# spent 90µs making 1 call to Moose::Meta::Role::Composite::meta
# spent 79µs making 1 call to Moose::Meta::Role::meta
# spent 79µs making 1 call to Moose::Meta::Role::Application::ToRole::meta
# spent 78µs making 1 call to Moose::Meta::TypeCoercion::Union::meta
# spent 70µs making 1 call to Moose::Meta::TypeCoercion::meta
# spent 70µs making 1 call to Class::MOP::Mixin::meta
# spent 70µs making 1 call to Moose::Meta::Role::Application::meta
# spent 69µs making 1 call to Moose::Meta::Role::Application::ToClass::meta
# spent 69µs making 1 call to Moose::Meta::Role::Application::RoleSummation::meta
# spent 69µs making 1 call to Moose::Meta::Role::Application::ToInstance::meta |
| 237 | map { $_->meta } | ||||
| 238 | qw( | ||||
| 239 | Moose::Meta::Attribute | ||||
| 240 | Moose::Meta::Class | ||||
| 241 | Moose::Meta::Instance | ||||
| 242 | |||||
| 243 | Moose::Meta::TypeCoercion | ||||
| 244 | Moose::Meta::TypeCoercion::Union | ||||
| 245 | |||||
| 246 | Moose::Meta::Method | ||||
| 247 | Moose::Meta::Method::Accessor | ||||
| 248 | Moose::Meta::Method::Constructor | ||||
| 249 | Moose::Meta::Method::Destructor | ||||
| 250 | Moose::Meta::Method::Overridden | ||||
| 251 | Moose::Meta::Method::Augmented | ||||
| 252 | |||||
| 253 | Moose::Meta::Role | ||||
| 254 | Moose::Meta::Role::Attribute | ||||
| 255 | Moose::Meta::Role::Method | ||||
| 256 | Moose::Meta::Role::Method::Required | ||||
| 257 | Moose::Meta::Role::Method::Conflicting | ||||
| 258 | |||||
| 259 | Moose::Meta::Role::Composite | ||||
| 260 | |||||
| 261 | Moose::Meta::Role::Application | ||||
| 262 | Moose::Meta::Role::Application::RoleSummation | ||||
| 263 | Moose::Meta::Role::Application::ToClass | ||||
| 264 | Moose::Meta::Role::Application::ToRole | ||||
| 265 | Moose::Meta::Role::Application::ToInstance | ||||
| 266 | 1 | 2µs | ); | ||
| 267 | |||||
| 268 | 1 | 24µs | 2 | 46.8ms | Moose::Meta::Mixin::AttributeCore->meta->make_immutable( # spent 46.7ms making 1 call to Class::MOP::Class::make_immutable
# spent 78µs making 1 call to Class::MOP::Mixin::meta |
| 269 | inline_constructor => 0, | ||||
| 270 | constructor_name => undef, | ||||
| 271 | ); | ||||
| 272 | |||||
| 273 | 1 | 56µs | 1; | ||
| 274 | |||||
| 275 | __END__ |