Filename | /usr/share/perl5/DBIx/Class/Relationship/BelongsTo.pm |
Statements | Executed 0 statements in 0s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
164 | 164 | 89 | 7.39ms | 85.2ms | belongs_to (recurses: max depth 1, inclusive time 704µs) | DBIx::Class::Relationship::BelongsTo::
372 | 3 | 1 | 573µs | 573µs | CORE:match (opcode) | DBIx::Class::Relationship::BelongsTo::
1 | 1 | 1 | 17µs | 29µs | BEGIN@7 | DBIx::Class::Relationship::BelongsTo::
1 | 1 | 1 | 10µs | 53µs | BEGIN@9 | DBIx::Class::Relationship::BelongsTo::
1 | 1 | 1 | 10µs | 2.70ms | BEGIN@10 | DBIx::Class::Relationship::BelongsTo::
1 | 1 | 1 | 9µs | 19µs | BEGIN@8 | DBIx::Class::Relationship::BelongsTo::
0 | 0 | 0 | 0s | 0s | __ANON__[:46] | DBIx::Class::Relationship::BelongsTo::
0 | 0 | 0 | 0s | 0s | __ANON__[:52] | DBIx::Class::Relationship::BelongsTo::
0 | 0 | 0 | 0s | 0s | catch {...} | DBIx::Class::Relationship::BelongsTo::
0 | 0 | 0 | 0s | 0s | try {...} | DBIx::Class::Relationship::BelongsTo::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package # hide from PAUSE | ||||
2 | DBIx::Class::Relationship::BelongsTo; | ||||
3 | |||||
4 | # Documentation for these methods can be found in | ||||
5 | # DBIx::Class::Relationship | ||||
6 | |||||
7 | 2 | 41µs | # spent 29µs (17+12) within DBIx::Class::Relationship::BelongsTo::BEGIN@7 which was called:
# once (17µs+12µs) by Class::C3::Componentised::ensure_class_loaded at line 7 # spent 29µs making 1 call to DBIx::Class::Relationship::BelongsTo::BEGIN@7
# spent 12µs making 1 call to strict::import | ||
8 | 2 | 29µs | # spent 19µs (9+10) within DBIx::Class::Relationship::BelongsTo::BEGIN@8 which was called:
# once (9µs+10µs) by Class::C3::Componentised::ensure_class_loaded at line 8 # spent 19µs making 1 call to DBIx::Class::Relationship::BelongsTo::BEGIN@8
# spent 10µs making 1 call to warnings::import | ||
9 | 2 | 96µs | # spent 53µs (10+43) within DBIx::Class::Relationship::BelongsTo::BEGIN@9 which was called:
# once (10µs+43µs) by Class::C3::Componentised::ensure_class_loaded at line 9 # spent 53µs making 1 call to DBIx::Class::Relationship::BelongsTo::BEGIN@9
# spent 43µs making 1 call to Exporter::import | ||
10 | 2 | 5.38ms | # spent 2.70ms (10µs+2.69) within DBIx::Class::Relationship::BelongsTo::BEGIN@10 which was called:
# once (10µs+2.69ms) by Class::C3::Componentised::ensure_class_loaded at line 10 # spent 2.70ms making 1 call to DBIx::Class::Relationship::BelongsTo::BEGIN@10
# spent 2.69ms making 1 call to namespace::clean::import | ||
11 | |||||
12 | our %_pod_inherit_config = | ||||
13 | ( | ||||
14 | class_map => { 'DBIx::Class::Relationship::BelongsTo' => 'DBIx::Class::Relationship' } | ||||
15 | ); | ||||
16 | |||||
17 | # spent 85.2ms (7.39+77.8) within DBIx::Class::Relationship::BelongsTo::belongs_to which was called 164 times, avg 519µs/call:
# once (80µs+5.69ms) by Class::C3::Componentised::ensure_class_loaded at line 637 of Koha/Schema/Result/Item.pm
# once (20µs+4.83ms) by Class::C3::Componentised::ensure_class_loaded at line 89 of Koha/Schema/Result/BorrowerAttribute.pm
# once (62µs+1.74ms) by Class::C3::Componentised::ensure_class_loaded at line 77 of Koha/Schema/Result/PatronList.pm
# once (61µs+1.52ms) by Class::C3::Componentised::ensure_class_loaded at line 59 of Koha/Schema/Result/CategoriesBranch.pm
# once (67µs+1.31ms) by Class::C3::Componentised::ensure_class_loaded at line 59 of Koha/Schema/Result/BorrowerAttributeTypesBranch.pm
# once (61µs+1.14ms) by Class::C3::Componentised::ensure_class_loaded at line 322 of Koha/Schema/Result/Aqbookseller.pm
# once (46µs+1.04ms) by Class::C3::Componentised::ensure_class_loaded at line 404 of Koha/Schema/Result/Subscription.pm
# once (65µs+1.02ms) by Class::C3::Componentised::ensure_class_loaded at line 79 of Koha/Schema/Result/BorrowerAttributeTypesBranch.pm
# once (57µs+1.02ms) by Class::C3::Componentised::ensure_class_loaded at line 93 of Koha/Schema/Result/Discharge.pm
# once (47µs+1.02ms) by Class::C3::Componentised::ensure_class_loaded at line 384 of Koha/Schema/Result/Subscription.pm
# once (49µs+1.01ms) by Class::C3::Componentised::ensure_class_loaded at line 472 of Koha/Schema/Result/Aqorder.pm
# once (58µs+972µs) by Class::C3::Componentised::ensure_class_loaded at line 93 of Koha/Schema/Result/ClassSource.pm
# once (54µs+961µs) by Class::C3::Componentised::ensure_class_loaded at line 71 of Koha/Schema/Result/Aqbasketuser.pm
# once (20µs+984µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/Serialitem.pm
# once (20µs+955µs) by Class::C3::Componentised::ensure_class_loaded at line 452 of Koha/Schema/Result/Aqorder.pm
# once (59µs+898µs) by Class::C3::Componentised::ensure_class_loaded at line 97 of Koha/Schema/Result/TagsApproval.pm
# once (56µs+883µs) by Class::C3::Componentised::ensure_class_loaded at line 94 of Koha/Schema/Result/ItemsSearchField.pm
# once (57µs+869µs) by Class::C3::Componentised::ensure_class_loaded at line 97 of Koha/Schema/Result/AqordersTransfer.pm
# once (42µs+881µs) by Class::C3::Componentised::ensure_class_loaded at line 164 of Koha/Schema/Result/CreatorBatch.pm
# once (49µs+874µs) by Class::C3::Componentised::ensure_class_loaded at line 436 of Koha/Schema/Result/Item.pm
# once (43µs+868µs) by Class::C3::Componentised::ensure_class_loaded at line 117 of Koha/Schema/Result/AqordersTransfer.pm
# once (46µs+849µs) by Class::C3::Componentised::ensure_class_loaded at line 342 of Koha/Schema/Result/Aqbookseller.pm
# once (54µs+809µs) by Class::C3::Componentised::ensure_class_loaded at line 129 of Koha/Schema/Result/CreatorBatch.pm
# once (36µs+790µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/CourseInstructor.pm
# once (60µs+756µs) by Class::C3::Componentised::ensure_class_loaded at line 131 of Koha/Schema/Result/Aqinvoice.pm
# once (41µs+770µs) by Class::C3::Componentised::ensure_class_loaded at line 149 of Koha/Schema/Result/CreatorBatch.pm
# once (22µs+781µs) by Class::C3::Componentised::ensure_class_loaded at line 531 of Koha/Schema/Result/Item.pm
# once (24µs+776µs) by Class::C3::Componentised::ensure_class_loaded at line 103 of Koha/Schema/Result/BranchItemRule.pm
# once (45µs+754µs) by Class::C3::Componentised::ensure_class_loaded at line 159 of Koha/Schema/Result/CourseItem.pm
# once (48µs+742µs) by Class::C3::Componentised::ensure_class_loaded at line 122 of Koha/Schema/Result/AuthTagStructure.pm
# once (20µs+753µs) by Class::C3::Componentised::ensure_class_loaded at line 95 of Koha/Schema/Result/TagsIndex.pm
# once (58µs+698µs) by Class::C3::Componentised::ensure_class_loaded at line 118 of Koha/Schema/Result/Branchtransfer.pm
# once (55µs+697µs) by Class::C3::Componentised::ensure_class_loaded at line 305 of Koha/Schema/Result/Suggestion.pm
# once (75µs+672µs) by Class::C3::Componentised::ensure_class_loaded at line 72 of Koha/Schema/Result/MatchpointComponentNorm.pm
# once (32µs+705µs) by Class::C3::Componentised::ensure_class_loaded at line 148 of Koha/Schema/Result/Branchtransfer.pm
# once (46µs+689µs) by Class::C3::Componentised::ensure_class_loaded at line 199 of Koha/Schema/Result/Aqbasket.pm
# once (56µs+655µs) by Class::C3::Componentised::ensure_class_loaded at line 177 of Koha/Schema/Result/OldIssue.pm
# once (52µs+653µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/Permission.pm
# once (18µs+685µs) by Class::C3::Componentised::ensure_class_loaded at line 164 of Koha/Schema/Result/MessageTransport.pm
# once (18µs+681µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/AqorderUser.pm
# once (18µs+676µs) by Class::C3::Componentised::ensure_class_loaded at line 139 of Koha/Schema/Result/HoldFillTarget.pm
# once (52µs+640µs) by Class::C3::Componentised::ensure_class_loaded at line 79 of Koha/Schema/Result/CategoriesBranch.pm
# once (52µs+636µs) by Class::C3::Componentised::ensure_class_loaded at line 91 of Koha/Schema/Result/Biblioimage.pm
# once (49µs+633µs) by Class::C3::Componentised::ensure_class_loaded at line 146 of Koha/Schema/Result/Aqinvoice.pm
# once (40µs+625µs) by Class::C3::Componentised::ensure_class_loaded at line 254 of Koha/Schema/Result/Aqbasket.pm
# once (46µs+613µs) by Class::C3::Componentised::ensure_class_loaded at line 197 of Koha/Schema/Result/OldIssue.pm
# once (19µs+586µs) by Class::C3::Componentised::ensure_class_loaded at line 234 of Koha/Schema/Result/Aqbasket.pm
# once (20µs+575µs) by Class::C3::Componentised::ensure_class_loaded at line 133 of Koha/Schema/Result/Virtualshelfcontent.pm
# once (72µs+456µs) by Class::C3::Componentised::ensure_class_loaded at line 229 of Koha/Schema/Result/MarcModificationTemplateAction.pm
# once (84µs+402µs) by Class::C3::Componentised::ensure_class_loaded at line 97 of Koha/Schema/Result/Virtualshelfshare.pm
# once (67µs+399µs) by Class::C3::Componentised::ensure_class_loaded at line 76 of Koha/Schema/Result/DefaultBorrowerCircRule.pm
# once (70µs+362µs) by Class::C3::Componentised::ensure_class_loaded at line 135 of Koha/Schema/Result/Letter.pm
# once (52µs+380µs) by Class::C3::Componentised::ensure_class_loaded at line 71 of Koha/Schema/Result/Serialitem.pm
# once (56µs+367µs) by Class::C3::Componentised::ensure_class_loaded at line 156 of Koha/Schema/Result/MessageQueue.pm
# once (62µs+354µs) by Class::C3::Componentised::ensure_class_loaded at line 74 of Koha/Schema/Result/BorrowerAttribute.pm
# once (65µs+346µs) by Class::C3::Componentised::ensure_class_loaded at line 771 of Koha/Schema/Result/Borrower.pm
# once (106µs+304µs) by Class::C3::Componentised::ensure_class_loaded at line 64 of Koha/Schema/Result/ImportRecordMatch.pm
# once (43µs+364µs) by Class::C3::Componentised::ensure_class_loaded at line 133 of Koha/Schema/Result/Branchtransfer.pm
# once (58µs+346µs) by Class::C3::Componentised::ensure_class_loaded at line 151 of Koha/Schema/Result/Virtualshelve.pm
# once (57µs+346µs) by Class::C3::Componentised::ensure_class_loaded at line 89 of Koha/Schema/Result/TransportCost.pm
# once (62µs+339µs) by Class::C3::Componentised::ensure_class_loaded at line 88 of Koha/Schema/Result/BranchItemRule.pm
# once (57µs+336µs) by Class::C3::Componentised::ensure_class_loaded at line 109 of Koha/Schema/Result/BorrowerSync.pm
# once (57µs+336µs) by Class::C3::Componentised::ensure_class_loaded at line 204 of Koha/Schema/Result/AuthSubfieldStructure.pm
# once (55µs+337µs) by Class::C3::Componentised::ensure_class_loaded at line 103 of Koha/Schema/Result/Review.pm
# once (55µs+331µs) by Class::C3::Componentised::ensure_class_loaded at line 131 of Koha/Schema/Result/BorrowerDebarment.pm
# once (65µs+321µs) by Class::C3::Componentised::ensure_class_loaded at line 156 of Koha/Schema/Result/Aqcontact.pm
# once (59µs+327µs) by Class::C3::Componentised::ensure_class_loaded at line 87 of Koha/Schema/Result/Branchrelation.pm
# once (54µs+328µs) by Class::C3::Componentised::ensure_class_loaded at line 105 of Koha/Schema/Result/ItemsLastBorrower.pm
# once (55µs+325µs) by Class::C3::Componentised::ensure_class_loaded at line 204 of Koha/Schema/Result/OldReserve.pm
# once (57µs+321µs) by Class::C3::Componentised::ensure_class_loaded at line 77 of Koha/Schema/Result/PatronListPatron.pm
# once (67µs+306µs) by Class::C3::Componentised::ensure_class_loaded at line 93 of Koha/Schema/Result/Accountoffset.pm
# once (54µs+319µs) by Class::C3::Componentised::ensure_class_loaded at line 189 of Koha/Schema/Result/Accountline.pm
# once (56µs+316µs) by Class::C3::Componentised::ensure_class_loaded at line 104 of Koha/Schema/Result/TagAll.pm
# once (57µs+314µs) by Class::C3::Componentised::ensure_class_loaded at line 98 of Koha/Schema/Result/Virtualshelfcontent.pm
# once (47µs+323µs) by Class::C3::Componentised::ensure_class_loaded at line 91 of Koha/Schema/Result/DefaultBranchCircRule.pm
# once (51µs+316µs) by Class::C3::Componentised::ensure_class_loaded at line 114 of Koha/Schema/Result/BorrowerFile.pm
# once (66µs+300µs) by Class::C3::Componentised::ensure_class_loaded at line 71 of Koha/Schema/Result/Aqbudgetborrower.pm
# once (54µs+311µs) by Class::C3::Componentised::ensure_class_loaded at line 78 of Koha/Schema/Result/UserPermission.pm
# once (58µs+306µs) by Class::C3::Componentised::ensure_class_loaded at line 139 of Koha/Schema/Result/OpacNews.pm
# once (59µs+303µs) by Class::C3::Componentised::ensure_class_loaded at line 77 of Koha/Schema/Result/DefaultBranchItemRule.pm
# once (57µs+303µs) by Class::C3::Componentised::ensure_class_loaded at line 92 of Koha/Schema/Result/Rating.pm
# once (53µs+305µs) by Class::C3::Componentised::ensure_class_loaded at line 218 of Koha/Schema/Result/Reserve.pm
# once (47µs+311µs) by Class::C3::Componentised::ensure_class_loaded at line 85 of Koha/Schema/Result/OverduerulesTransportType.pm
# once (55µs+301µs) by Class::C3::Componentised::ensure_class_loaded at line 82 of Koha/Schema/Result/AqordersItem.pm
# once (54µs+300µs) by Class::C3::Componentised::ensure_class_loaded at line 76 of Koha/Schema/Result/Patronimage.pm
# once (54µs+300µs) by Class::C3::Componentised::ensure_class_loaded at line 100 of Koha/Schema/Result/Subscriptionroutinglist.pm
# once (61µs+292µs) by Class::C3::Componentised::ensure_class_loaded at line 80 of Koha/Schema/Result/ImportAuth.pm
# once (50µs+298µs) by Class::C3::Componentised::ensure_class_loaded at line 87 of Koha/Schema/Result/BranchBorrowerCircRule.pm
# once (74µs+271µs) by Class::C3::Componentised::ensure_class_loaded at line 121 of Koha/Schema/Result/CourseReserve.pm
# once (42µs+303µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/Aqbasketuser.pm
# once (52µs+288µs) by Class::C3::Componentised::ensure_class_loaded at line 80 of Koha/Schema/Result/TagsIndex.pm
# once (70µs+268µs) by Class::C3::Componentised::ensure_class_loaded at line 112 of Koha/Schema/Result/ImportItem.pm
# once (52µs+286µs) by Class::C3::Componentised::ensure_class_loaded at line 94 of Koha/Schema/Result/HoldFillTarget.pm
# once (52µs+281µs) by Class::C3::Componentised::ensure_class_loaded at line 192 of Koha/Schema/Result/Issue.pm
# once (62µs+269µs) by Class::C3::Componentised::ensure_class_loaded at line 101 of Koha/Schema/Result/AdditionalFieldValue.pm
# once (46µs+280µs) by Class::C3::Componentised::ensure_class_loaded at line 71 of Koha/Schema/Result/CourseInstructor.pm
# once (45µs+281µs) by Class::C3::Componentised::ensure_class_loaded at line 179 of Koha/Schema/Result/CourseItem.pm
# once (49µs+274µs) by Class::C3::Componentised::ensure_class_loaded at line 125 of Koha/Schema/Result/BorrowerMessagePreference.pm
# once (46µs+273µs) by Class::C3::Componentised::ensure_class_loaded at line 130 of Koha/Schema/Result/Aqbasketgroup.pm
# once (47µs+268µs) by Class::C3::Componentised::ensure_class_loaded at line 115 of Koha/Schema/Result/Aqcontract.pm
# once (78µs+237µs) by Class::C3::Componentised::ensure_class_loaded at line 85 of Koha/Schema/Result/Matchcheck.pm
# once (46µs+268µs) by Class::C3::Componentised::ensure_class_loaded at line 71 of Koha/Schema/Result/AqorderUser.pm
# once (64µs+247µs) by Class::C3::Componentised::ensure_class_loaded at line 85 of Koha/Schema/Result/BorrowerMessageTransportPreference.pm
# once (30µs+277µs) by Class::C3::Componentised::ensure_class_loaded at line 397 of Koha/Schema/Result/Aqorder.pm
# once (66µs+238µs) by Class::C3::Componentised::ensure_class_loaded at line 107 of Koha/Schema/Result/Collection.pm
# once (66µs+237µs) by Class::C3::Componentised::ensure_class_loaded at line 57 of Koha/Schema/Result/MatcherMatchpoint.pm
# once (65µs+237µs) by Class::C3::Componentised::ensure_class_loaded at line 112 of Koha/Schema/Result/ImportBiblio.pm
# once (68µs+233µs) by Class::C3::Componentised::ensure_class_loaded at line 87 of Koha/Schema/Result/OaiSetsMapping.pm
# once (56µs+244µs) by Class::C3::Componentised::ensure_class_loaded at line 57 of Koha/Schema/Result/OaiSetsDescription.pm
# once (40µs+258µs) by Class::C3::Componentised::ensure_class_loaded at line 219 of Koha/Schema/Result/Aqbasket.pm
# once (19µs+274µs) by Class::C3::Componentised::ensure_class_loaded at line 102 of Koha/Schema/Result/BorrowerMessageTransportPreference.pm
# once (65µs+227µs) by Class::C3::Componentised::ensure_class_loaded at line 117 of Koha/Schema/Result/MatchpointComponent.pm
# once (61µs+229µs) by Class::C3::Componentised::ensure_class_loaded at line 70 of Koha/Schema/Result/OaiSetsBiblio.pm
# once (61µs+228µs) by Class::C3::Componentised::ensure_class_loaded at line 108 of Koha/Schema/Result/AqbudgetsPlanning.pm
# once (24µs+260µs) by Class::C3::Componentised::ensure_class_loaded at line 511 of Koha/Schema/Result/Item.pm
# once (23µs+253µs) by Class::C3::Componentised::ensure_class_loaded at line 73 of Koha/Schema/Result/AuthorisedValuesBranch.pm
# once (54µs+219µs) by Class::C3::Componentised::ensure_class_loaded at line 130 of Koha/Schema/Result/MessageTransport.pm
# once (31µs+241µs) by Class::C3::Componentised::ensure_class_loaded at line 228 of Koha/Schema/Result/Issue.pm
# once (18µs+246µs) by Class::C3::Componentised::ensure_class_loaded at line 248 of Koha/Schema/Result/Reserve.pm
# once (23µs+226µs) by Class::C3::Componentised::ensure_class_loaded at line 786 of Koha/Schema/Result/Borrower.pm
# once (56µs+188µs) by Class::C3::Componentised::ensure_class_loaded at line 235 of Koha/Schema/Result/Issue.pm
# once (39µs+196µs) by Class::C3::Componentised::ensure_class_loaded at line 1182 of Koha/Schema/Result/Borrower.pm
# once (42µs+186µs) by Class::C3::Componentised::ensure_class_loaded at line 92 of Koha/Schema/Result/PatronListPatron.pm
# once (65µs+159µs) by Class::C3::Componentised::ensure_class_loaded at line 58 of Koha/Schema/Result/AuthorisedValuesBranch.pm
# once (20µs+204µs) by Class::C3::Componentised::ensure_class_loaded at line 113 of Koha/Schema/Result/Virtualshelfcontent.pm
# once (19µs+204µs) by Class::C3::Componentised::ensure_class_loaded at line 117 of Koha/Schema/Result/Virtualshelfshare.pm
# once (19µs+198µs) by Class::C3::Componentised::ensure_class_loaded at line 107 of Koha/Schema/Result/Rating.pm
# once (20µs+194µs) by Class::C3::Componentised::ensure_class_loaded at line 102 of Koha/Schema/Result/Branchrelation.pm
# once (26µs+187µs) by Class::C3::Componentised::ensure_class_loaded at line 120 of Koha/Schema/Result/ItemsLastBorrower.pm
# once (54µs+157µs) by Class::C3::Componentised::ensure_class_loaded at line 220 of Koha/Schema/Result/ImportRecord.pm
# once (26µs+182µs) by Class::C3::Componentised::ensure_class_loaded at line 284 of Koha/Schema/Result/Reserve.pm
# once (59µs+148µs) by Class::C3::Componentised::ensure_class_loaded at line 116 of Koha/Schema/Result/Matchpoint.pm
# once (24µs+183µs) by Class::C3::Componentised::ensure_class_loaded at line 176 of Koha/Schema/Result/MessageQueue.pm
# once (21µs+183µs) by Class::C3::Componentised::ensure_class_loaded at line 102 of Koha/Schema/Result/BranchBorrowerCircRule.pm
# once (27µs+174µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/Aqbudgetborrower.pm
# once (20µs+181µs) by Class::C3::Componentised::ensure_class_loaded at line 145 of Koha/Schema/Result/BorrowerMessagePreference.pm
# once (30µs+171µs) by Class::C3::Componentised::ensure_class_loaded at line 93 of Koha/Schema/Result/UserPermission.pm
# once (19µs+180µs) by Class::C3::Componentised::ensure_class_loaded at line 417 of Koha/Schema/Result/Aqorder.pm
# once (20µs+179µs) by Class::C3::Componentised::ensure_class_loaded at line 123 of Koha/Schema/Result/Review.pm
# once (18µs+178µs) by Class::C3::Componentised::ensure_class_loaded at line 109 of Koha/Schema/Result/HoldFillTarget.pm
# once (18µs+178µs) by Class::C3::Componentised::ensure_class_loaded at line 104 of Koha/Schema/Result/TransportCost.pm
# once (18µs+178µs) by Class::C3::Componentised::ensure_class_loaded at line 115 of Koha/Schema/Result/Subscriptionroutinglist.pm
# once (19µs+177µs) by Class::C3::Componentised::ensure_class_loaded at line 119 of Koha/Schema/Result/TagAll.pm
# once (21µs+174µs) by Class::C3::Componentised::ensure_class_loaded at line 124 of Koha/Schema/Result/HoldFillTarget.pm
# once (19µs+174µs) by Class::C3::Componentised::ensure_class_loaded at line 268 of Koha/Schema/Result/Reserve.pm
# once (18µs+173µs) by Class::C3::Componentised::ensure_class_loaded at line 233 of Koha/Schema/Result/Reserve.pm
# once (19µs+172µs) by Class::C3::Componentised::ensure_class_loaded at line 204 of Koha/Schema/Result/Accountline.pm
# once (18µs+172µs) by Class::C3::Componentised::ensure_class_loaded at line 224 of Koha/Schema/Result/OldReserve.pm
# once (18µs+171µs) by Class::C3::Componentised::ensure_class_loaded at line 212 of Koha/Schema/Result/Issue.pm
# once (36µs+152µs) by Class::C3::Componentised::ensure_class_loaded at line 437 of Koha/Schema/Result/Aqorder.pm
# once (18µs+168µs) by Class::C3::Componentised::ensure_class_loaded at line 159 of Koha/Schema/Result/OpacNews.pm
# once (18µs+167µs) by Class::C3::Componentised::ensure_class_loaded at line 244 of Koha/Schema/Result/OldReserve.pm
# once (25µs+150µs) by Class::C3::Componentised::ensure_class_loaded at line 100 of Koha/Schema/Result/OverduerulesTransportType.pm
# once (28µs+146µs) by Class::C3::Componentised::ensure_class_loaded at line 136 of Koha/Schema/Result/CourseReserve.pm
# once (39µs+130µs) by Class::C3::Componentised::ensure_class_loaded at line 149 of Koha/Schema/Result/MessageTransport.pm
# once (23µs+138µs) by Class::C3::Componentised::ensure_class_loaded at line 72 of Koha/Schema/Result/MatcherMatchpoint.pm
# once (25µs+136µs) by Class::C3::Componentised::ensure_class_loaded at line 247 of Koha/Schema/Result/Issue.pm
# once (26µs+135µs) by Class::C3::Componentised::ensure_class_loaded at line 115 of Koha/Schema/Result/Matchcheck.pm
# once (25µs+135µs) by Class::C3::Componentised::ensure_class_loaded at line 100 of Koha/Schema/Result/Matchcheck.pm
# once (24µs+135µs) by Class::C3::Componentised::ensure_class_loaded at line 296 of Koha/Schema/Result/Reserve.pm
# once (27µs+132µs) by Class::C3::Componentised::ensure_class_loaded at line 165 of Koha/Schema/Result/BorrowerMessagePreference.pm
# once (24µs+124µs) by Class::C3::Componentised::ensure_class_loaded at line 639 of Koha/Schema/Result/Item.pm
# once (61µs+-61µs) by Class::C3::Componentised::ensure_class_loaded at line 321 of Koha/Schema/Result/Biblioitem.pm
# once (64µs+-64µs) by Class::C3::Componentised::ensure_class_loaded at line 347 of Koha/Schema/Result/Biblioitem.pm | ||||
18 | my ($class, $rel, $f_class, $cond, $attrs) = @_; | ||||
19 | |||||
20 | # assume a foreign key constraint unless defined otherwise | ||||
21 | $attrs->{is_foreign_key_constraint} = 1 | ||||
22 | if not exists $attrs->{is_foreign_key_constraint}; | ||||
23 | $attrs->{undef_on_null_fk} = 1 | ||||
24 | if not exists $attrs->{undef_on_null_fk}; | ||||
25 | |||||
26 | # no join condition or just a column name | ||||
27 | if (!ref $cond) { | ||||
28 | |||||
29 | my ($f_key, $guess); | ||||
30 | if (defined $cond and length $cond) { | ||||
31 | $f_key = $cond; | ||||
32 | $guess = "caller specified foreign key '$f_key'"; | ||||
33 | } | ||||
34 | else { | ||||
35 | $f_key = $rel; | ||||
36 | $guess = "using given relationship name '$rel' as foreign key column name"; | ||||
37 | } | ||||
38 | |||||
39 | 2 | 26µs | $class->throw_exception( # spent 26µs making 2 calls to DBIx::Class::ResultSourceProxy::has_column, avg 13µs/call | ||
40 | "No such column '$f_key' declared yet on ${class} ($guess)" | ||||
41 | ) unless $class->has_column($f_key); | ||||
42 | |||||
43 | 2 | 0s | $class->ensure_class_loaded($f_class); # spent 5.49ms making 2 calls to Class::C3::Componentised::ensure_class_loaded, avg 2.75ms/call, recursion: max depth 2, sum of overlapping time 5.49ms | ||
44 | my $f_rsrc = try { | ||||
45 | 2 | 24µs | $f_class->result_source_instance; # spent 18µs making 1 call to Koha::Schema::Result::Biblio::result_source_instance
# spent 7µs making 1 call to Koha::Schema::Result::Biblioitem::result_source_instance | ||
46 | } | ||||
47 | catch { | ||||
48 | $class->throw_exception( | ||||
49 | "Foreign class '$f_class' does not seem to be a Result class " | ||||
50 | . "(or it simply did not load entirely due to a circular relation chain)" | ||||
51 | ); | ||||
52 | 4 | 103µs | }; # spent 85µs making 2 calls to Try::Tiny::try, avg 43µs/call
# spent 18µs making 2 calls to Try::Tiny::catch, avg 9µs/call | ||
53 | |||||
54 | 2 | 33µs | my $pri = $f_rsrc->_single_pri_col_or_die; # spent 33µs making 2 calls to DBIx::Class::ResultSource::_single_pri_col_or_die, avg 17µs/call | ||
55 | |||||
56 | $cond = { "foreign.${pri}" => "self.${f_key}" }; | ||||
57 | |||||
58 | } | ||||
59 | # explicit join condition | ||||
60 | else { | ||||
61 | if (ref $cond eq 'HASH') { # ARRAY is also valid | ||||
62 | my $cond_rel; | ||||
63 | # FIXME This loop is ridiculously incomplete and dangerous | ||||
64 | # staving off changes until implmentation of the swindon consensus | ||||
65 | for (keys %$cond) { | ||||
66 | 165 | 197µs | if (m/\./) { # Explicit join condition # spent 197µs making 165 calls to DBIx::Class::Relationship::BelongsTo::CORE:match, avg 1µs/call | ||
67 | $cond_rel = $cond; | ||||
68 | last; | ||||
69 | } | ||||
70 | $cond_rel->{"foreign.$_"} = "self.".$cond->{$_}; | ||||
71 | } | ||||
72 | $cond = $cond_rel; | ||||
73 | } | ||||
74 | } | ||||
75 | |||||
76 | 324 | 3.47ms | my $acc_type = ( # spent 3.19ms making 162 calls to DBIx::Class::ResultSourceProxy::has_column, avg 20µs/call
# spent 279µs making 162 calls to DBIx::Class::Relationship::BelongsTo::CORE:match, avg 2µs/call | ||
77 | ref $cond eq 'HASH' | ||||
78 | and | ||||
79 | keys %$cond == 1 | ||||
80 | and | ||||
81 | (keys %$cond)[0] =~ /^foreign\./ | ||||
82 | and | ||||
83 | $class->has_column($rel) | ||||
84 | ) ? 'filter' : 'single'; | ||||
85 | |||||
86 | 45 | 96µs | my $fk_columns = ($acc_type eq 'single' and ref $cond eq 'HASH') # spent 96µs making 45 calls to DBIx::Class::Relationship::BelongsTo::CORE:match, avg 2µs/call | ||
87 | ? { map { $_ =~ /^self\.(.+)/ ? ( $1 => 1 ) : () } (values %$cond ) } | ||||
88 | : undef | ||||
89 | ; | ||||
90 | |||||
91 | $class->add_relationship($rel, $f_class, | ||||
92 | $cond, | ||||
93 | { | ||||
94 | is_depends_on => 1, | ||||
95 | accessor => $acc_type, | ||||
96 | $fk_columns ? ( fk_columns => $fk_columns ) : (), | ||||
97 | 164 | 69.1ms | %{$attrs || {}} # spent 69.1ms making 164 calls to DBIx::Class::ResultSourceProxy::add_relationship, avg 421µs/call | ||
98 | } | ||||
99 | ); | ||||
100 | |||||
101 | return 1; | ||||
102 | } | ||||
103 | |||||
104 | 1 | 94µs | 1; # spent 94µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__ | ||
# spent 573µs within DBIx::Class::Relationship::BelongsTo::CORE:match which was called 372 times, avg 2µs/call:
# 165 times (197µs+0s) by DBIx::Class::Relationship::BelongsTo::belongs_to at line 66, avg 1µs/call
# 162 times (279µs+0s) by DBIx::Class::Relationship::BelongsTo::belongs_to at line 76, avg 2µs/call
# 45 times (96µs+0s) by DBIx::Class::Relationship::BelongsTo::belongs_to at line 86, avg 2µs/call |