← Index
NYTProf Performance Profile   « block view • line view • sub view »
For xt/tapper-mcp-scheduler-with-db-longrun.t
  Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:22:36 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/DBIx/Class/ResultSourceProxy/Table.pm
StatementsExecuted 354 statements in 4.33ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3737363.34ms17.5msDBIx::Class::ResultSourceProxy::Table::::tableDBIx::Class::ResultSourceProxy::Table::table
111202µs26.1msDBIx::Class::ResultSourceProxy::Table::::BEGIN@8DBIx::Class::ResultSourceProxy::Table::BEGIN@8
11112µs14µsDBIx::Class::ResultSourceProxy::Table::::BEGIN@3DBIx::Class::ResultSourceProxy::Table::BEGIN@3
11110µs54µsDBIx::Class::ResultSourceProxy::Table::::BEGIN@9DBIx::Class::ResultSourceProxy::Table::BEGIN@9
1118µs162µsDBIx::Class::ResultSourceProxy::Table::::BEGIN@10DBIx::Class::ResultSourceProxy::Table::BEGIN@10
1117µs1.44msDBIx::Class::ResultSourceProxy::Table::::BEGIN@6DBIx::Class::ResultSourceProxy::Table::BEGIN@6
1117µs15µsDBIx::Class::ResultSourceProxy::Table::::BEGIN@4DBIx::Class::ResultSourceProxy::Table::BEGIN@4
0000s0sDBIx::Class::ResultSourceProxy::Table::::_init_result_source_instanceDBIx::Class::ResultSourceProxy::Table::_init_result_source_instance
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package DBIx::Class::ResultSourceProxy::Table;
2
3318µs216µs
# spent 14µs (12+2) within DBIx::Class::ResultSourceProxy::Table::BEGIN@3 which was called: # once (12µs+2µs) by Class::C3::Componentised::ensure_class_loaded at line 3
use strict;
# spent 14µs making 1 call to DBIx::Class::ResultSourceProxy::Table::BEGIN@3 # spent 2µs making 1 call to strict::import
4320µs224µs
# spent 15µs (7+8) within DBIx::Class::ResultSourceProxy::Table::BEGIN@4 which was called: # once (7µs+8µs) by Class::C3::Componentised::ensure_class_loaded at line 4
use warnings;
# spent 15µs making 1 call to DBIx::Class::ResultSourceProxy::Table::BEGIN@4 # spent 8µs making 1 call to warnings::import
5
6323µs22.88ms
# spent 1.44ms (7µs+1.43) within DBIx::Class::ResultSourceProxy::Table::BEGIN@6 which was called: # once (7µs+1.43ms) by Class::C3::Componentised::ensure_class_loaded at line 6
use base qw/DBIx::Class::ResultSourceProxy/;
# spent 1.44ms making 1 call to DBIx::Class::ResultSourceProxy::Table::BEGIN@6 # spent 1.43ms making 1 call to base::import
7
83115µs126.1ms
# spent 26.1ms (202µs+25.9) within DBIx::Class::ResultSourceProxy::Table::BEGIN@8 which was called: # once (202µs+25.9ms) by Class::C3::Componentised::ensure_class_loaded at line 8
use DBIx::Class::ResultSource::Table;
# spent 26.1ms making 1 call to DBIx::Class::ResultSourceProxy::Table::BEGIN@8
9322µs298µs
# spent 54µs (10+44) within DBIx::Class::ResultSourceProxy::Table::BEGIN@9 which was called: # once (10µs+44µs) by Class::C3::Componentised::ensure_class_loaded at line 9
use Scalar::Util 'blessed';
# spent 54µs making 1 call to DBIx::Class::ResultSourceProxy::Table::BEGIN@9 # spent 44µs making 1 call to Exporter::import
103264µs2315µs
# spent 162µs (8+153) within DBIx::Class::ResultSourceProxy::Table::BEGIN@10 which was called: # once (8µs+153µs) by Class::C3::Componentised::ensure_class_loaded at line 10
use namespace::clean;
# spent 162µs making 1 call to DBIx::Class::ResultSourceProxy::Table::BEGIN@10 # spent 153µs making 1 call to namespace::clean::import
11
1217µs1216µs__PACKAGE__->mk_classdata(table_class => 'DBIx::Class::ResultSource::Table');
# spent 216µs making 1 call to DBIx::Class::mk_classdata
13
1411µs1134µs__PACKAGE__->mk_classdata('table_alias'); # FIXME: Doesn't actually do
# spent 134µs making 1 call to DBIx::Class::mk_classdata
15 # anything yet!
16
17sub _init_result_source_instance {
18 my $class = shift;
19
20 $class->mk_classdata('result_source_instance')
21 unless $class->can('result_source_instance');
22
23 my $table = $class->result_source_instance;
24 my $class_has_table_instance = ($table and $table->result_class eq $class);
25 return $table if $class_has_table_instance;
26
27 my $table_class = $class->table_class;
28 $class->ensure_class_loaded($table_class);
29
30 if( $table ) {
31 $table = $table_class->new({
32 %$table,
33 result_class => $class,
34 source_name => undef,
35 schema => undef
36 });
37 }
38 else {
39 $table = $table_class->new({
40 name => undef,
41 result_class => $class,
42 source_name => undef,
43 });
44 }
45
46 $class->result_source_instance($table);
47
48 return $table;
49}
50
51=head1 NAME
52
53DBIx::Class::ResultSourceProxy::Table - provides a classdata table
54object and method proxies
55
56=head1 SYNOPSIS
57
58 __PACKAGE__->table('cd');
59 __PACKAGE__->add_columns(qw/cdid artist title year/);
60 __PACKAGE__->set_primary_key('cdid');
61
62=head1 METHODS
63
64=head2 add_columns
65
66 __PACKAGE__->add_columns(qw/cdid artist title year/);
67
68Adds columns to the current class and creates accessors for them.
69
70=cut
71
72=head2 table
73
74 __PACKAGE__->table('tbl_name');
75
76Gets or sets the table name.
77
78=cut
79
80
# spent 17.5ms (3.34+14.2) within DBIx::Class::ResultSourceProxy::Table::table which was called 37 times, avg 473µs/call: # once (89µs+1.26ms) by Class::C3::Componentised::ensure_class_loaded at line 18 of Tapper/Schema/ReportsDB/Result/View010TestrunOverviewReports.pm # once (129µs+635µs) by Tapper::MCP::Scheduler::PrioQueue::BEGIN@1 at line 18 of Tapper/Schema/TestrunDB/Result/TestrunScheduling.pm # once (100µs+402µs) by Class::C3::Componentised::ensure_class_loaded at line 18 of Tapper/Schema/ReportsDB/Result/Report.pm # once (101µs+387µs) by Class::C3::Componentised::ensure_class_loaded at line 7 of DBIx/Class/Schema/Versioned.pm # once (92µs+393µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/ReportsDB/Result/ReportgroupArbitrary.pm # once (90µs+392µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/TestrunDB/Result/TestplanInstance.pm # once (104µs+371µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/ReportsDB/Result/ReportComment.pm # once (98µs+372µs) by Class::C3::Componentised::ensure_class_loaded at line 18 of Tapper/Schema/ReportsDB/Result/Tap.pm # once (97µs+372µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/ReportsDB/Result/Contact.pm # once (94µs+368µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/ReportsDB/Result/NotificationEvent.pm # once (92µs+366µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/ReportsDB/Result/Notification.pm # once (92µs+364µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/TestrunDB/Result/State.pm # once (87µs+368µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/ReportsDB/Result/User.pm # once (89µs+366µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/ReportsDB/Result/ReportgroupTestrunStats.pm # once (90µs+364µs) by Class::C3::Componentised::ensure_class_loaded at line 17 of Tapper/Schema/TestrunDB/Result/Testrun.pm # once (99µs+354µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/ReportsDB/Result/ReportFile.pm # once (91µs+360µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/TestrunDB/Result/Message.pm # once (94µs+357µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/TestrunDB/Result/Queue.pm # once (92µs+355µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/TestrunDB/Result/TestrunRequestedHost.pm # once (90µs+355µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/ReportsDB/Result/Suite.pm # once (92µs+353µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/ReportsDB/Result/ReportSection.pm # once (88µs+354µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/TestrunDB/Result/HostFeature.pm # once (89µs+353µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/ReportsDB/Result/ReportgroupTestrun.pm # once (85µs+355µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/TestrunDB/Result/Precondition.pm # once (92µs+345µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/TestrunDB/Result/ScenarioElement.pm # once (89µs+347µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/TestrunDB/Result/Scenario.pm # once (87µs+349µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/TestrunDB/Result/TestrunRequestedFeature.pm # once (92µs+339µs) by Class::C3::Componentised::ensure_class_loaded at line 16 of Tapper/Schema/TestrunDB/Result/Host.pm # once (87µs+335µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/TestrunDB/Result/User.pm # once (86µs+332µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/ReportsDB/Result/ReportTopic.pm # once (86µs+332µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/TestrunDB/Result/TestrunPrecondition.pm # once (80µs+330µs) by Class::C3::Componentised::ensure_class_loaded at line 28 of Tapper/Schema/TestrunDB/Result/Topic.pm # once (83µs+326µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/TestrunDB/Result/PrePrecondition.pm # once (79µs+321µs) by Class::C3::Componentised::ensure_class_loaded at line 28 of Tapper/Schema/TestrunDB/Result/Preconditiontype.pm # once (80µs+317µs) by Class::C3::Componentised::ensure_class_loaded at line 15 of Tapper/Schema/TestrunDB/Result/QueueHost.pm # once (72µs+268µs) by Class::C3::Componentised::ensure_class_loaded at line 18 of Tapper/Schema/ReportsDB/Result/View020TestrunOverview.pm # once (68µs+261µs) by Class::C3::Componentised::ensure_class_loaded at line 34 of DBIx/Class/Schema/Versioned.pm
sub table {
813333.85ms my ($class, $table) = @_;
82 return $class->result_source_instance->name unless $table;
83
843746µs unless (blessed $table && $table->isa($class->table_class)) {
# spent 46µs making 37 calls to Scalar::Util::blessed, avg 1µs/call
85
86373.87ms my $table_class = $class->table_class;
# spent 3.87ms making 37 calls to DBIx::Class::ResultSourceProxy::Table::table_class, avg 105µs/call
873710µs $class->ensure_class_loaded($table_class);
# spent 1.11ms making 37 calls to Class::C3::Componentised::ensure_class_loaded, avg 30µs/call, recursion: max depth 1, sum of overlapping time 1.10ms
88
89 $table = $table_class->new({
90 $class->can('result_source_instance')
91741.39ms ? %{$class->result_source_instance||{}}
# spent 652µs making 37 calls to UNIVERSAL::can, avg 18µs/call # spent 645µs making 35 calls to DBIx::Class::ResultSource::new, avg 18µs/call # spent 95µs making 2 calls to DBIx::Class::ResultSource::View::new, avg 47µs/call
92 : ()
93 ,
94 name => $table,
95 result_class => $class,
96 });
97 }
98
99745.81ms $class->mk_classdata('result_source_instance')
# spent 5.74ms making 37 calls to DBIx::Class::mk_classdata, avg 155µs/call # spent 71µs making 37 calls to UNIVERSAL::can, avg 2µs/call
100 unless $class->can('result_source_instance');
101
102371.11ms $class->result_source_instance($table);
# spent 38µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportComment::result_source_instance # spent 38µs making 1 call to Tapper::Schema::ReportsDB::Result::Report::result_source_instance # spent 37µs making 1 call to Tapper::Schema::ReportsDB::Result::Notification::result_source_instance # spent 34µs making 1 call to Tapper::Schema::TestrunDB::Result::Topic::result_source_instance # spent 34µs making 1 call to Tapper::Schema::TestrunDB::Result::User::result_source_instance # spent 33µs making 1 call to Tapper::Schema::TestrunDB::Result::TestplanInstance::result_source_instance # spent 33µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportSection::result_source_instance # spent 33µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportTopic::result_source_instance # spent 33µs making 1 call to Tapper::Schema::TestrunDB::Result::State::result_source_instance # spent 32µs making 1 call to Tapper::Schema::TestrunDB::Result::HostFeature::result_source_instance # spent 32µs making 1 call to Tapper::Schema::ReportsDB::Result::Tap::result_source_instance # spent 32µs making 1 call to Tapper::Schema::ReportsDB::Result::NotificationEvent::result_source_instance # spent 32µs making 1 call to Tapper::Schema::ReportsDB::Result::Contact::result_source_instance # spent 31µs making 1 call to Tapper::Schema::TestrunDB::Result::Message::result_source_instance # spent 31µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::result_source_instance # spent 31µs making 1 call to Tapper::Schema::TestrunDB::Result::Testrun::result_source_instance # spent 31µs making 1 call to Tapper::Schema::TestrunDB::Result::Scenario::result_source_instance # spent 30µs making 1 call to Tapper::Schema::TestrunDB::Result::TestrunRequestedFeature::result_source_instance # spent 30µs making 1 call to Tapper::Schema::ReportsDB::Result::User::result_source_instance # spent 30µs making 1 call to Tapper::Schema::TestrunDB::Result::Host::result_source_instance # spent 30µs making 1 call to Tapper::Schema::TestrunDB::Result::Queue::result_source_instance # spent 30µs making 1 call to Tapper::Schema::ReportsDB::Result::Suite::result_source_instance # spent 30µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportgroupTestrun::result_source_instance # spent 30µs making 1 call to Tapper::Schema::TestrunDB::Result::ScenarioElement::result_source_instance # spent 30µs making 1 call to Tapper::Schema::TestrunDB::Result::Precondition::result_source_instance # spent 29µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportgroupTestrunStats::result_source_instance # spent 29µs making 1 call to Tapper::Schema::TestrunDB::Result::TestrunPrecondition::result_source_instance # spent 29µs making 1 call to Tapper::Schema::TestrunDB::Result::TestrunRequestedHost::result_source_instance # spent 29µs making 1 call to Tapper::Schema::TestrunDB::Result::TestrunScheduling::result_source_instance # spent 29µs making 1 call to Tapper::Schema::TestrunDB::Result::PrePrecondition::result_source_instance # spent 29µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportFile::result_source_instance # spent 28µs making 1 call to Tapper::Schema::TestrunDB::Result::Preconditiontype::result_source_instance # spent 28µs making 1 call to Tapper::Schema::TestrunDB::Result::QueueHost::result_source_instance # spent 27µs making 1 call to DBIx::Class::Version::Table::result_source_instance # spent 19µs making 1 call to DBIx::Class::Version::TableCompat::result_source_instance # spent 15µs making 1 call to Tapper::Schema::ReportsDB::Result::View010TestrunOverviewReports::result_source_instance # spent 12µs making 1 call to Tapper::Schema::ReportsDB::Result::View020TestrunOverview::result_source_instance
103
10450825µs return $class->result_source_instance->name;
# spent 350µs making 3 calls to DBIx::Class::ResultSource::name, avg 117µs/call # spent 20µs making 1 call to Tapper::Schema::TestrunDB::Result::TestplanInstance::result_source_instance # spent 19µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportSection::result_source_instance # spent 17µs making 10 calls to DBIx::Class::ResultSource::Table::name, avg 2µs/call # spent 16µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportgroupTestrun::result_source_instance # spent 15µs making 1 call to Tapper::Schema::TestrunDB::Result::Preconditiontype::result_source_instance # spent 15µs making 1 call to Tapper::Schema::ReportsDB::Result::View010TestrunOverviewReports::result_source_instance # spent 15µs making 1 call to DBIx::Class::Version::Table::result_source_instance # spent 15µs making 1 call to Tapper::Schema::TestrunDB::Result::Testrun::result_source_instance # spent 13µs making 1 call to Tapper::Schema::ReportsDB::Result::NotificationEvent::result_source_instance # spent 12µs making 1 call to Tapper::Schema::TestrunDB::Result::Precondition::result_source_instance # spent 12µs making 1 call to Tapper::Schema::ReportsDB::Result::Contact::result_source_instance # spent 12µs making 1 call to Tapper::Schema::TestrunDB::Result::Queue::result_source_instance # spent 12µs making 1 call to Tapper::Schema::TestrunDB::Result::TestrunRequestedFeature::result_source_instance # spent 12µs making 1 call to Tapper::Schema::TestrunDB::Result::ScenarioElement::result_source_instance # spent 12µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::result_source_instance # spent 12µs making 1 call to Tapper::Schema::ReportsDB::Result::Report::result_source_instance # spent 12µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportgroupTestrunStats::result_source_instance # spent 12µs making 1 call to Tapper::Schema::ReportsDB::Result::User::result_source_instance # spent 12µs making 1 call to Tapper::Schema::TestrunDB::Result::Host::result_source_instance # spent 12µs making 1 call to Tapper::Schema::TestrunDB::Result::TestrunRequestedHost::result_source_instance # spent 12µs making 1 call to Tapper::Schema::TestrunDB::Result::TestrunScheduling::result_source_instance # spent 12µs making 1 call to Tapper::Schema::ReportsDB::Result::Suite::result_source_instance # spent 12µs making 1 call to Tapper::Schema::ReportsDB::Result::Tap::result_source_instance # spent 12µs making 1 call to Tapper::Schema::TestrunDB::Result::Topic::result_source_instance # spent 12µs making 1 call to Tapper::Schema::TestrunDB::Result::User::result_source_instance # spent 11µs making 1 call to Tapper::Schema::TestrunDB::Result::HostFeature::result_source_instance # spent 11µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportFile::result_source_instance # spent 11µs making 1 call to Tapper::Schema::ReportsDB::Result::Notification::result_source_instance # spent 11µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportComment::result_source_instance # spent 11µs making 1 call to Tapper::Schema::TestrunDB::Result::Message::result_source_instance # spent 11µs making 1 call to Tapper::Schema::TestrunDB::Result::State::result_source_instance # spent 11µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportTopic::result_source_instance # spent 11µs making 1 call to Tapper::Schema::TestrunDB::Result::TestrunPrecondition::result_source_instance # spent 11µs making 1 call to Tapper::Schema::TestrunDB::Result::PrePrecondition::result_source_instance # spent 11µs making 1 call to Tapper::Schema::TestrunDB::Result::QueueHost::result_source_instance # spent 11µs making 1 call to Tapper::Schema::TestrunDB::Result::Scenario::result_source_instance # spent 10µs making 1 call to Tapper::Schema::ReportsDB::Result::View020TestrunOverview::result_source_instance # spent 10µs making 1 call to DBIx::Class::Version::TableCompat::result_source_instance
105}
106
107=head2 has_column
108
109 if ($obj->has_column($col)) { ... }
110
111Returns 1 if the class has a column of this name, 0 otherwise.
112
113=cut
114
115=head2 column_info
116
117 my $info = $obj->column_info($col);
118
119Returns the column metadata hashref for a column. For a description of
120the various types of column data in this hashref, see
121L<DBIx::Class::ResultSource/add_column>
122
123=cut
124
125=head2 columns
126
127 my @column_names = $obj->columns;
128
129=cut
130
13114µs1;
132
133=head1 AUTHORS
134
135Matt S. Trout <mst@shadowcatsystems.co.uk>
136
137=head1 LICENSE
138
139You may distribute this code under the same terms as Perl itself.
140
141=cut
14216µs1106µs