← Index
NYTProf Performance Profile   « line view »
For starman worker -M FindBin --max-requests 50 --workers 2 --user=kohadev-koha --group kohadev-koha --pid /var/run/koha/kohadev/plack.pid --daemonize --access-log /var/log/koha/kohadev/plack.log --error-log /var/log/koha/kohadev/plack-error.log -E deployment --socket /var/run/koha/kohadev/plack.sock /etc/koha/sites/kohadev/plack.psgi
  Run on Fri Jan 8 14:31:06 2016
Reported on Fri Jan 8 14:31:37 2016

Filename/usr/share/perl5/DBIx/Class/Relationship/BelongsTo.pm
StatementsExecuted 2365 statements in 17.3ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1641648915.9ms104msDBIx::Class::Relationship::BelongsTo::::belongs_toDBIx::Class::Relationship::BelongsTo::belongs_to (recurses: max depth 1, inclusive time 4.14ms)
37231636µs636µsDBIx::Class::Relationship::BelongsTo::::CORE:matchDBIx::Class::Relationship::BelongsTo::CORE:match (opcode)
11115µs22µsDBIx::Class::Relationship::BelongsTo::::BEGIN@7DBIx::Class::Relationship::BelongsTo::BEGIN@7
11111µs2.92msDBIx::Class::Relationship::BelongsTo::::BEGIN@10DBIx::Class::Relationship::BelongsTo::BEGIN@10
11110µs14µsDBIx::Class::Relationship::BelongsTo::::BEGIN@8DBIx::Class::Relationship::BelongsTo::BEGIN@8
1118µs32µsDBIx::Class::Relationship::BelongsTo::::BEGIN@9DBIx::Class::Relationship::BelongsTo::BEGIN@9
0000s0sDBIx::Class::Relationship::BelongsTo::::__ANON__[:46]DBIx::Class::Relationship::BelongsTo::__ANON__[:46]
0000s0sDBIx::Class::Relationship::BelongsTo::::__ANON__[:52]DBIx::Class::Relationship::BelongsTo::__ANON__[:52]
0000s0sDBIx::Class::Relationship::BelongsTo::::catch {...} DBIx::Class::Relationship::BelongsTo::catch {...}
0000s0sDBIx::Class::Relationship::BelongsTo::::try {...} DBIx::Class::Relationship::BelongsTo::try {...}
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package # hide from PAUSE
2 DBIx::Class::Relationship::BelongsTo;
3
4# Documentation for these methods can be found in
5# DBIx::Class::Relationship
6
7281µs228µs
# spent 22µs (15+7) within DBIx::Class::Relationship::BelongsTo::BEGIN@7 which was called: # once (15µs+7µs) by Class::C3::Componentised::ensure_class_loaded at line 7
use strict;
# spent 22µs making 1 call to DBIx::Class::Relationship::BelongsTo::BEGIN@7 # spent 7µs making 1 call to strict::import
8235µs220µs
# spent 14µs (10+5) within DBIx::Class::Relationship::BelongsTo::BEGIN@8 which was called: # once (10µs+5µs) by Class::C3::Componentised::ensure_class_loaded at line 8
use warnings;
# spent 14µs making 1 call to DBIx::Class::Relationship::BelongsTo::BEGIN@8 # spent 5µs making 1 call to warnings::import
9256µs256µs
# spent 32µs (8+24) within DBIx::Class::Relationship::BelongsTo::BEGIN@9 which was called: # once (8µs+24µs) by Class::C3::Componentised::ensure_class_loaded at line 9
use Try::Tiny;
# spent 32µs making 1 call to DBIx::Class::Relationship::BelongsTo::BEGIN@9 # spent 24µs making 1 call to Exporter::import
1023.57ms25.83ms
# spent 2.92ms (11µs+2.91) within DBIx::Class::Relationship::BelongsTo::BEGIN@10 which was called: # once (11µs+2.91ms) by Class::C3::Componentised::ensure_class_loaded at line 10
use namespace::clean;
# spent 2.92ms making 1 call to DBIx::Class::Relationship::BelongsTo::BEGIN@10 # spent 2.91ms making 1 call to namespace::clean::import
11
1212µsour %_pod_inherit_config =
13 (
14 class_map => { 'DBIx::Class::Relationship::BelongsTo' => 'DBIx::Class::Relationship' }
15 );
16
17
# spent 104ms (15.9+87.6) within DBIx::Class::Relationship::BelongsTo::belongs_to which was called 164 times, avg 631µs/call: # once (81µs+8.97ms) by Class::C3::Componentised::ensure_class_loaded at line 637 of Koha/Schema/Result/Item.pm # once (4.66ms+425µs) by Class::C3::Componentised::ensure_class_loaded at line 156 of Koha/Schema/Result/Aqcontact.pm # once (62µs+4.68ms) by Class::C3::Componentised::ensure_class_loaded at line 177 of Koha/Schema/Result/OldIssue.pm # once (68µs+4.25ms) by Class::C3::Componentised::ensure_class_loaded at line 87 of Koha/Schema/Result/OaiSetsMapping.pm # once (69µs+2.07ms) by Class::C3::Componentised::ensure_class_loaded at line 91 of Koha/Schema/Result/Biblioimage.pm # once (57µs+1.55ms) by Class::C3::Componentised::ensure_class_loaded at line 404 of Koha/Schema/Result/Subscription.pm # once (45µs+1.54ms) by Class::C3::Componentised::ensure_class_loaded at line 472 of Koha/Schema/Result/Aqorder.pm # once (32µs+1.20ms) by Class::C3::Componentised::ensure_class_loaded at line 397 of Koha/Schema/Result/Aqorder.pm # once (59µs+1.17ms) by Class::C3::Componentised::ensure_class_loaded at line 151 of Koha/Schema/Result/Virtualshelve.pm # once (64µs+1.15ms) by Class::C3::Componentised::ensure_class_loaded at line 93 of Koha/Schema/Result/Discharge.pm # once (39µs+1.14ms) by Class::C3::Componentised::ensure_class_loaded at line 95 of Koha/Schema/Result/TagsIndex.pm # once (46µs+1.12ms) by Class::C3::Componentised::ensure_class_loaded at line 384 of Koha/Schema/Result/Subscription.pm # once (57µs+1.09ms) by Class::C3::Componentised::ensure_class_loaded at line 97 of Koha/Schema/Result/TagsApproval.pm # once (58µs+1.08ms) by Class::C3::Componentised::ensure_class_loaded at line 93 of Koha/Schema/Result/ClassSource.pm # once (77µs+995µs) by Class::C3::Componentised::ensure_class_loaded at line 76 of Koha/Schema/Result/DefaultBorrowerCircRule.pm # once (60µs+1.01ms) by Class::C3::Componentised::ensure_class_loaded at line 59 of Koha/Schema/Result/BorrowerAttributeTypesBranch.pm # once (19µs+1.03ms) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/Serialitem.pm # once (70µs+964µs) by Class::C3::Componentised::ensure_class_loaded at line 322 of Koha/Schema/Result/Aqbookseller.pm # once (19µs+1.01ms) by Class::C3::Componentised::ensure_class_loaded at line 139 of Koha/Schema/Result/HoldFillTarget.pm # once (69µs+961µs) by Class::C3::Componentised::ensure_class_loaded at line 118 of Koha/Schema/Result/Branchtransfer.pm # once (21µs+998µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/AqorderUser.pm # once (27µs+974µs) by Class::C3::Componentised::ensure_class_loaded at line 452 of Koha/Schema/Result/Aqorder.pm # once (45µs+945µs) by Class::C3::Componentised::ensure_class_loaded at line 79 of Koha/Schema/Result/BorrowerAttributeTypesBranch.pm # once (59µs+927µs) by Class::C3::Componentised::ensure_class_loaded at line 146 of Koha/Schema/Result/Aqinvoice.pm # once (56µs+930µs) by Class::C3::Componentised::ensure_class_loaded at line 94 of Koha/Schema/Result/ItemsSearchField.pm # once (22µs+947µs) by Class::C3::Componentised::ensure_class_loaded at line 148 of Koha/Schema/Result/Branchtransfer.pm # once (58µs+899µs) by Class::C3::Componentised::ensure_class_loaded at line 199 of Koha/Schema/Result/Aqbasket.pm # once (48µs+905µs) by Class::C3::Componentised::ensure_class_loaded at line 436 of Koha/Schema/Result/Item.pm # once (50µs+887µs) by Class::C3::Componentised::ensure_class_loaded at line 254 of Koha/Schema/Result/Aqbasket.pm # once (57µs+880µs) by Class::C3::Componentised::ensure_class_loaded at line 129 of Koha/Schema/Result/CreatorBatch.pm # once (50µs+851µs) by Class::C3::Componentised::ensure_class_loaded at line 164 of Koha/Schema/Result/CreatorBatch.pm # once (63µs+837µs) by Class::C3::Componentised::ensure_class_loaded at line 122 of Koha/Schema/Result/AuthTagStructure.pm # once (56µs+840µs) by Class::C3::Componentised::ensure_class_loaded at line 97 of Koha/Schema/Result/AqordersTransfer.pm # once (44µs+833µs) by Class::C3::Componentised::ensure_class_loaded at line 149 of Koha/Schema/Result/CreatorBatch.pm # once (44µs+824µs) by Class::C3::Componentised::ensure_class_loaded at line 117 of Koha/Schema/Result/AqordersTransfer.pm # once (98µs+756µs) by Class::C3::Componentised::ensure_class_loaded at line 80 of Koha/Schema/Result/TagsIndex.pm # once (60µs+773µs) by Class::C3::Componentised::ensure_class_loaded at line 305 of Koha/Schema/Result/Suggestion.pm # once (52µs+754µs) by Class::C3::Componentised::ensure_class_loaded at line 85 of Koha/Schema/Result/OverduerulesTransportType.pm # once (23µs+754µs) by Class::C3::Componentised::ensure_class_loaded at line 234 of Koha/Schema/Result/Aqbasket.pm # once (49µs+722µs) by Class::C3::Componentised::ensure_class_loaded at line 342 of Koha/Schema/Result/Aqbookseller.pm # once (27µs+720µs) by Class::C3::Componentised::ensure_class_loaded at line 511 of Koha/Schema/Result/Item.pm # once (51µs+687µs) by Class::C3::Componentised::ensure_class_loaded at line 131 of Koha/Schema/Result/Aqinvoice.pm # once (18µs+690µs) by Class::C3::Componentised::ensure_class_loaded at line 103 of Koha/Schema/Result/BranchItemRule.pm # once (43µs+663µs) by Class::C3::Componentised::ensure_class_loaded at line 531 of Koha/Schema/Result/Item.pm # once (18µs+672µs) by Class::C3::Componentised::ensure_class_loaded at line 133 of Koha/Schema/Result/Virtualshelfcontent.pm # once (51µs+615µs) by Class::C3::Componentised::ensure_class_loaded at line 114 of Koha/Schema/Result/BorrowerFile.pm # once (104µs+555µs) by Class::C3::Componentised::ensure_class_loaded at line 71 of Koha/Schema/Result/Aqbudgetborrower.pm # once (135µs+521µs) by Class::C3::Componentised::ensure_class_loaded at line 135 of Koha/Schema/Result/Letter.pm # once (55µs+594µs) by Class::C3::Componentised::ensure_class_loaded at line 91 of Koha/Schema/Result/DefaultBranchCircRule.pm # once (58µs+573µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/Permission.pm # once (20µs+603µs) by Class::C3::Componentised::ensure_class_loaded at line 89 of Koha/Schema/Result/BorrowerAttribute.pm # once (23µs+596µs) by Class::C3::Componentised::ensure_class_loaded at line 212 of Koha/Schema/Result/Issue.pm # once (79µs+481µs) by Class::C3::Componentised::ensure_class_loaded at line 82 of Koha/Schema/Result/AqordersItem.pm # once (106µs+382µs) by Class::C3::Componentised::ensure_class_loaded at line 70 of Koha/Schema/Result/OaiSetsBiblio.pm # once (110µs+376µs) by Class::C3::Componentised::ensure_class_loaded at line 117 of Koha/Schema/Result/MatchpointComponent.pm # once (66µs+391µs) by Class::C3::Componentised::ensure_class_loaded at line 78 of Koha/Schema/Result/UserPermission.pm # once (56µs+399µs) by Class::C3::Componentised::ensure_class_loaded at line 97 of Koha/Schema/Result/Virtualshelfshare.pm # once (58µs+393µs) by Class::C3::Componentised::ensure_class_loaded at line 89 of Koha/Schema/Result/TransportCost.pm # once (60µs+380µs) by Class::C3::Componentised::ensure_class_loaded at line 74 of Koha/Schema/Result/BorrowerAttribute.pm # once (56µs+383µs) by Class::C3::Componentised::ensure_class_loaded at line 204 of Koha/Schema/Result/OldReserve.pm # once (56µs+381µs) by Class::C3::Componentised::ensure_class_loaded at line 71 of Koha/Schema/Result/CourseInstructor.pm # once (78µs+351µs) by Class::C3::Componentised::ensure_class_loaded at line 71 of Koha/Schema/Result/AqorderUser.pm # once (57µs+359µs) by Class::C3::Componentised::ensure_class_loaded at line 192 of Koha/Schema/Result/Issue.pm # once (60µs+356µs) by Class::C3::Componentised::ensure_class_loaded at line 94 of Koha/Schema/Result/HoldFillTarget.pm # once (60µs+350µs) by Class::C3::Componentised::ensure_class_loaded at line 98 of Koha/Schema/Result/Virtualshelfcontent.pm # once (79µs+329µs) by Class::C3::Componentised::ensure_class_loaded at line 87 of Koha/Schema/Result/Branchrelation.pm # once (56µs+350µs) by Class::C3::Componentised::ensure_class_loaded at line 131 of Koha/Schema/Result/BorrowerDebarment.pm # once (29µs+376µs) by Class::C3::Componentised::ensure_class_loaded at line 102 of Koha/Schema/Result/BorrowerMessageTransportPreference.pm # once (61µs+336µs) by Class::C3::Componentised::ensure_class_loaded at line 771 of Koha/Schema/Result/Borrower.pm # once (54µs+342µs) by Class::C3::Componentised::ensure_class_loaded at line 189 of Koha/Schema/Result/Accountline.pm # once (68µs+328µs) by Class::C3::Componentised::ensure_class_loaded at line 417 of Koha/Schema/Result/Aqorder.pm # once (67µs+329µs) by Class::C3::Componentised::ensure_class_loaded at line 85 of Koha/Schema/Result/BorrowerMessageTransportPreference.pm # once (58µs+337µs) by Class::C3::Componentised::ensure_class_loaded at line 133 of Koha/Schema/Result/Branchtransfer.pm # once (54µs+339µs) by Class::C3::Componentised::ensure_class_loaded at line 109 of Koha/Schema/Result/BorrowerSync.pm # once (54µs+340µs) by Class::C3::Componentised::ensure_class_loaded at line 156 of Koha/Schema/Result/MessageQueue.pm # once (58µs+335µs) by Class::C3::Componentised::ensure_class_loaded at line 59 of Koha/Schema/Result/CategoriesBranch.pm # once (60µs+331µs) by Class::C3::Componentised::ensure_class_loaded at line 115 of Koha/Schema/Result/Aqcontract.pm # once (54µs+336µs) by Class::C3::Componentised::ensure_class_loaded at line 105 of Koha/Schema/Result/ItemsLastBorrower.pm # once (64µs+325µs) by Class::C3::Componentised::ensure_class_loaded at line 92 of Koha/Schema/Result/Rating.pm # once (58µs+330µs) by Class::C3::Componentised::ensure_class_loaded at line 76 of Koha/Schema/Result/Patronimage.pm # once (56µs+332µs) by Class::C3::Componentised::ensure_class_loaded at line 103 of Koha/Schema/Result/Review.pm # once (55µs+332µs) by Class::C3::Componentised::ensure_class_loaded at line 218 of Koha/Schema/Result/Reserve.pm # once (72µs+314µs) by Class::C3::Componentised::ensure_class_loaded at line 71 of Koha/Schema/Result/Aqbasketuser.pm # once (53µs+332µs) by Class::C3::Componentised::ensure_class_loaded at line 87 of Koha/Schema/Result/BranchBorrowerCircRule.pm # once (57µs+328µs) by Class::C3::Componentised::ensure_class_loaded at line 204 of Koha/Schema/Result/AuthSubfieldStructure.pm # once (57µs+326µs) by Class::C3::Componentised::ensure_class_loaded at line 71 of Koha/Schema/Result/Serialitem.pm # once (56µs+322µs) by Class::C3::Componentised::ensure_class_loaded at line 77 of Koha/Schema/Result/DefaultBranchItemRule.pm # once (56µs+316µs) by Class::C3::Componentised::ensure_class_loaded at line 139 of Koha/Schema/Result/OpacNews.pm # once (48µs+321µs) by Class::C3::Componentised::ensure_class_loaded at line 219 of Koha/Schema/Result/Aqbasket.pm # once (55µs+313µs) by Class::C3::Componentised::ensure_class_loaded at line 93 of Koha/Schema/Result/Accountoffset.pm # once (52µs+309µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/Aqbudgetborrower.pm # once (46µs+314µs) by Class::C3::Componentised::ensure_class_loaded at line 125 of Koha/Schema/Result/BorrowerMessagePreference.pm # once (51µs+308µs) by Class::C3::Componentised::ensure_class_loaded at line 100 of Koha/Schema/Result/Subscriptionroutinglist.pm # once (116µs+243µs) by Class::C3::Componentised::ensure_class_loaded at line 121 of Koha/Schema/Result/CourseReserve.pm # once (72µs+285µs) by Class::C3::Componentised::ensure_class_loaded at line 112 of Koha/Schema/Result/ImportBiblio.pm # once (54µs+301µs) by Class::C3::Componentised::ensure_class_loaded at line 77 of Koha/Schema/Result/PatronList.pm # once (53µs+294µs) by Class::C3::Componentised::ensure_class_loaded at line 77 of Koha/Schema/Result/PatronListPatron.pm # once (56µs+290µs) by Class::C3::Componentised::ensure_class_loaded at line 104 of Koha/Schema/Result/TagAll.pm # once (70µs+276µs) by Class::C3::Componentised::ensure_class_loaded at line 64 of Koha/Schema/Result/ImportRecordMatch.pm # once (71µs+274µs) by Class::C3::Componentised::ensure_class_loaded at line 58 of Koha/Schema/Result/AuthorisedValuesBranch.pm # once (22µs+320µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/Aqbasketuser.pm # once (72µs+270µs) by Class::C3::Componentised::ensure_class_loaded at line 57 of Koha/Schema/Result/MatcherMatchpoint.pm # once (44µs+294µs) by Class::C3::Componentised::ensure_class_loaded at line 130 of Koha/Schema/Result/Aqbasketgroup.pm # once (46µs+291µs) by Class::C3::Componentised::ensure_class_loaded at line 159 of Koha/Schema/Result/CourseItem.pm # once (53µs+283µs) by Class::C3::Componentised::ensure_class_loaded at line 88 of Koha/Schema/Result/BranchItemRule.pm # once (66µs+265µs) by Class::C3::Componentised::ensure_class_loaded at line 112 of Koha/Schema/Result/ImportItem.pm # once (76µs+254µs) by Class::C3::Componentised::ensure_class_loaded at line 229 of Koha/Schema/Result/MarcModificationTemplateAction.pm # once (68µs+262µs) by Class::C3::Componentised::ensure_class_loaded at line 101 of Koha/Schema/Result/AdditionalFieldValue.pm # once (62µs+264µs) by Class::C3::Componentised::ensure_class_loaded at line 57 of Koha/Schema/Result/OaiSetsDescription.pm # once (68µs+256µs) by Class::C3::Componentised::ensure_class_loaded at line 108 of Koha/Schema/Result/AqbudgetsPlanning.pm # once (70µs+249µs) by Class::C3::Componentised::ensure_class_loaded at line 72 of Koha/Schema/Result/MatchpointComponentNorm.pm # once (67µs+240µs) by Class::C3::Componentised::ensure_class_loaded at line 107 of Koha/Schema/Result/Collection.pm # once (66µs+241µs) by Class::C3::Componentised::ensure_class_loaded at line 85 of Koha/Schema/Result/Matchcheck.pm # once (31µs+264µs) by Class::C3::Componentised::ensure_class_loaded at line 197 of Koha/Schema/Result/OldIssue.pm # once (22µs+262µs) by Class::C3::Componentised::ensure_class_loaded at line 248 of Koha/Schema/Result/Reserve.pm # once (60µs+223µs) by Class::C3::Componentised::ensure_class_loaded at line 80 of Koha/Schema/Result/ImportAuth.pm # once (18µs+262µs) by Class::C3::Componentised::ensure_class_loaded at line 164 of Koha/Schema/Result/MessageTransport.pm # once (59µs+217µs) by Class::C3::Componentised::ensure_class_loaded at line 228 of Koha/Schema/Result/Issue.pm # once (24µs+252µs) by Class::C3::Componentised::ensure_class_loaded at line 79 of Koha/Schema/Result/CategoriesBranch.pm # once (19µs+255µs) by Class::C3::Componentised::ensure_class_loaded at line 73 of Koha/Schema/Result/AuthorisedValuesBranch.pm # once (36µs+232µs) by Class::C3::Componentised::ensure_class_loaded at line 268 of Koha/Schema/Result/Reserve.pm # once (54µs+213µs) by Class::C3::Componentised::ensure_class_loaded at line 130 of Koha/Schema/Result/MessageTransport.pm # once (52µs+195µs) by Class::C3::Componentised::ensure_class_loaded at line 100 of Koha/Schema/Result/OverduerulesTransportType.pm # once (36µs+207µs) by Class::C3::Componentised::ensure_class_loaded at line 93 of Koha/Schema/Result/UserPermission.pm # once (27µs+210µs) by Class::C3::Componentised::ensure_class_loaded at line 296 of Koha/Schema/Result/Reserve.pm # once (27µs+203µs) by Class::C3::Componentised::ensure_class_loaded at line 92 of Koha/Schema/Result/PatronListPatron.pm # once (28µs+201µs) by Class::C3::Componentised::ensure_class_loaded at line 102 of Koha/Schema/Result/BranchBorrowerCircRule.pm # once (19µs+204µs) by Class::C3::Componentised::ensure_class_loaded at line 204 of Koha/Schema/Result/Accountline.pm # once (19µs+200µs) by Class::C3::Componentised::ensure_class_loaded at line 233 of Koha/Schema/Result/Reserve.pm # once (23µs+196µs) by Class::C3::Componentised::ensure_class_loaded at line 115 of Koha/Schema/Result/Subscriptionroutinglist.pm # once (21µs+197µs) by Class::C3::Componentised::ensure_class_loaded at line 113 of Koha/Schema/Result/Virtualshelfcontent.pm # once (31µs+185µs) by Class::C3::Componentised::ensure_class_loaded at line 284 of Koha/Schema/Result/Reserve.pm # once (21µs+195µs) by Class::C3::Componentised::ensure_class_loaded at line 159 of Koha/Schema/Result/OpacNews.pm # once (21µs+195µs) by Class::C3::Componentised::ensure_class_loaded at line 117 of Koha/Schema/Result/Virtualshelfshare.pm # once (20µs+194µs) by Class::C3::Componentised::ensure_class_loaded at line 786 of Koha/Schema/Result/Borrower.pm # once (28µs+186µs) by Class::C3::Componentised::ensure_class_loaded at line 136 of Koha/Schema/Result/CourseReserve.pm # once (20µs+194µs) by Class::C3::Componentised::ensure_class_loaded at line 145 of Koha/Schema/Result/BorrowerMessagePreference.pm # once (56µs+156µs) by Class::C3::Componentised::ensure_class_loaded at line 220 of Koha/Schema/Result/ImportRecord.pm # once (20µs+191µs) by Class::C3::Componentised::ensure_class_loaded at line 244 of Koha/Schema/Result/OldReserve.pm # once (56µs+154µs) by Class::C3::Componentised::ensure_class_loaded at line 116 of Koha/Schema/Result/Matchpoint.pm # once (40µs+169µs) by Class::C3::Componentised::ensure_class_loaded at line 1182 of Koha/Schema/Result/Borrower.pm # once (18µs+190µs) by Class::C3::Componentised::ensure_class_loaded at line 102 of Koha/Schema/Result/Branchrelation.pm # once (20µs+188µs) by Class::C3::Componentised::ensure_class_loaded at line 109 of Koha/Schema/Result/HoldFillTarget.pm # once (20µs+188µs) by Class::C3::Componentised::ensure_class_loaded at line 224 of Koha/Schema/Result/OldReserve.pm # once (18µs+187µs) by Class::C3::Componentised::ensure_class_loaded at line 124 of Koha/Schema/Result/HoldFillTarget.pm # once (19µs+183µs) by Class::C3::Componentised::ensure_class_loaded at line 120 of Koha/Schema/Result/ItemsLastBorrower.pm # once (19µs+182µs) by Class::C3::Componentised::ensure_class_loaded at line 107 of Koha/Schema/Result/Rating.pm # once (19µs+182µs) by Class::C3::Componentised::ensure_class_loaded at line 119 of Koha/Schema/Result/TagAll.pm # once (19µs+181µs) by Class::C3::Componentised::ensure_class_loaded at line 179 of Koha/Schema/Result/CourseItem.pm # once (19µs+181µs) by Class::C3::Componentised::ensure_class_loaded at line 104 of Koha/Schema/Result/TransportCost.pm # once (28µs+170µs) by Class::C3::Componentised::ensure_class_loaded at line 86 of Koha/Schema/Result/CourseInstructor.pm # once (28µs+169µs) by Class::C3::Componentised::ensure_class_loaded at line 437 of Koha/Schema/Result/Aqorder.pm # once (20µs+176µs) by Class::C3::Componentised::ensure_class_loaded at line 123 of Koha/Schema/Result/Review.pm # once (36µs+157µs) by Class::C3::Componentised::ensure_class_loaded at line 165 of Koha/Schema/Result/BorrowerMessagePreference.pm # once (8µs+183µs) by Class::C3::Componentised::ensure_class_loaded at line 176 of Koha/Schema/Result/MessageQueue.pm # once (25µs+145µs) by Class::C3::Componentised::ensure_class_loaded at line 235 of Koha/Schema/Result/Issue.pm # once (39µs+131µs) by Class::C3::Componentised::ensure_class_loaded at line 149 of Koha/Schema/Result/MessageTransport.pm # once (26µs+143µs) by Class::C3::Componentised::ensure_class_loaded at line 72 of Koha/Schema/Result/MatcherMatchpoint.pm # once (26µs+141µs) by Class::C3::Componentised::ensure_class_loaded at line 100 of Koha/Schema/Result/Matchcheck.pm # once (24µs+136µs) by Class::C3::Componentised::ensure_class_loaded at line 247 of Koha/Schema/Result/Issue.pm # once (28µs+127µs) by Class::C3::Componentised::ensure_class_loaded at line 115 of Koha/Schema/Result/Matchcheck.pm # once (26µs+128µs) by Class::C3::Componentised::ensure_class_loaded at line 639 of Koha/Schema/Result/Item.pm # once (66µs+-66µs) by Class::C3::Componentised::ensure_class_loaded at line 347 of Koha/Schema/Result/Biblioitem.pm # once (3.44ms+-3.44ms) by Class::C3::Componentised::ensure_class_loaded at line 321 of Koha/Schema/Result/Biblioitem.pm
sub belongs_to {
18164124µs my ($class, $rel, $f_class, $cond, $attrs) = @_;
19
20 # assume a foreign key constraint unless defined otherwise
21164253µs $attrs->{is_foreign_key_constraint} = 1
22 if not exists $attrs->{is_foreign_key_constraint};
23164133µs $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
27164136µs if (!ref $cond) {
28
292300ns my ($f_key, $guess);
3022µs if (defined $cond and length $cond) {
312700ns $f_key = $cond;
3222µs $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
3923µs226µ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
43212µs20s $class->ensure_class_loaded($f_class);
# spent 8.76ms making 2 calls to Class::C3::Componentised::ensure_class_loaded, avg 4.38ms/call, recursion: max depth 2, sum of overlapping time 8.76ms
44 my $f_rsrc = try {
4525µs225µs $f_class->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 );
52276µs4103µs };
# spent 82µs making 2 calls to Try::Tiny::try, avg 41µs/call # spent 21µs making 2 calls to Try::Tiny::catch, avg 10µs/call
53
54211µs236µs my $pri = $f_rsrc->_single_pri_col_or_die;
# spent 36µs making 2 calls to DBIx::Class::ResultSource::_single_pri_col_or_die, avg 18µs/call
55
5624µs $cond = { "foreign.${pri}" => "self.${f_key}" };
57
58 }
59 # explicit join condition
60 else {
61162149µs if (ref $cond eq 'HASH') { # ARRAY is also valid
6216220µs my $cond_rel;
63 # FIXME This loop is ridiculously incomplete and dangerous
64 # staving off changes until implmentation of the swindon consensus
65162254µs for (keys %$cond) {
66165684µs165220µs if (m/\./) { # Explicit join condition
# spent 220µs making 165 calls to DBIx::Class::Relationship::BelongsTo::CORE:match, avg 1µs/call
67 $cond_rel = $cond;
68 last;
69 }
70165500µs $cond_rel->{"foreign.$_"} = "self.".$cond->{$_};
71 }
7216263µs $cond = $cond_rel;
73 }
74 }
75
761647.52ms3243.89ms my $acc_type = (
# spent 3.58ms making 162 calls to DBIx::Class::ResultSourceProxy::has_column, avg 22µs/call # spent 311µ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
8645349µs45105µs my $fk_columns = ($acc_type eq 'single' and ref $cond eq 'HASH')
# spent 105µs making 45 calls to DBIx::Class::Relationship::BelongsTo::CORE:match, avg 2µs/call
87164258µs ? { 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 ) : (),
971642.25ms16478.5ms %{$attrs || {}}
# spent 78.5ms making 164 calls to DBIx::Class::ResultSourceProxy::add_relationship, avg 479µs/call
98 }
99 );
100
101164773µs return 1;
102}
103
10414µs189µs1;
# spent 89µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__
 
# spent 636µs within DBIx::Class::Relationship::BelongsTo::CORE:match which was called 372 times, avg 2µs/call: # 165 times (220µs+0s) by DBIx::Class::Relationship::BelongsTo::belongs_to at line 66, avg 1µs/call # 162 times (311µs+0s) by DBIx::Class::Relationship::BelongsTo::belongs_to at line 76, avg 2µs/call # 45 times (105µs+0s) by DBIx::Class::Relationship::BelongsTo::belongs_to at line 86, avg 2µs/call
sub DBIx::Class::Relationship::BelongsTo::CORE:match; # opcode