Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Tapper/Schema/ReportsDB/Result/ReportgroupArbitrary.pm |
Statements | Executed 18 statements in 323µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 12µs | 12µs | BEGIN@2 | Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::
1 | 1 | 1 | 11µs | 16µs | BEGIN@9 | Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::
1 | 1 | 1 | 10µs | 50µs | BEGIN@12 | Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::
1 | 1 | 1 | 10µs | 26µs | BEGIN@10 | Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::
0 | 0 | 0 | 0s | 0s | groupreports | Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary; | ||||
2 | # spent 12µs within Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::BEGIN@2 which was called:
# once (12µs+0s) by Class::C3::Componentised::ensure_class_loaded at line 4 | ||||
3 | 1 | 5µs | $Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::AUTHORITY = 'cpan:AMD'; | ||
4 | 1 | 30µs | 1 | 12µs | } # spent 12µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::BEGIN@2 |
5 | { | ||||
6 | 2 | 900ns | $Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::VERSION = '0.001'; | ||
7 | } | ||||
8 | |||||
9 | 3 | 21µs | 2 | 21µs | # spent 16µs (11+5) within Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::BEGIN@9 which was called:
# once (11µs+5µs) by Class::C3::Componentised::ensure_class_loaded at line 9 # spent 16µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::BEGIN@9
# spent 5µs making 1 call to strict::import |
10 | 3 | 22µs | 2 | 43µs | # spent 26µs (10+17) within Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::BEGIN@10 which was called:
# once (10µs+17µs) by Class::C3::Componentised::ensure_class_loaded at line 10 # spent 26µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::BEGIN@10
# spent 17µs making 1 call to warnings::import |
11 | |||||
12 | 3 | 152µs | 2 | 91µs | # spent 50µs (10+41) within Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::BEGIN@12 which was called:
# once (10µs+41µs) by Class::C3::Componentised::ensure_class_loaded at line 12 # spent 50µs making 1 call to Tapper::Schema::ReportsDB::Result::ReportgroupArbitrary::BEGIN@12
# spent 41µs making 1 call to parent::import |
13 | |||||
14 | 1 | 12µs | 1 | 251µs | __PACKAGE__->load_components("Core"); # spent 251µs making 1 call to Class::C3::Componentised::load_components |
15 | 1 | 20µs | 1 | 485µs | __PACKAGE__->table("reportgrouparbitrary"); # spent 485µs making 1 call to DBIx::Class::ResultSourceProxy::Table::table |
16 | 1 | 24µs | 1 | 528µs | __PACKAGE__->add_columns # spent 528µs making 1 call to DBIx::Class::ResultSourceProxy::add_columns |
17 | ( | ||||
18 | "arbitrary_id", { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 255, }, | ||||
19 | "report_id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_foreign_key => 1, }, | ||||
20 | "primaryreport", { data_type => "INT", default_value => undef, is_nullable => 1, size => 11, }, | ||||
21 | "owner", { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 255, }, | ||||
22 | ); | ||||
23 | |||||
24 | 1 | 15µs | 1 | 64µs | __PACKAGE__->set_primary_key(qw/arbitrary_id report_id/); # spent 64µs making 1 call to DBIx::Class::ResultSourceProxy::set_primary_key |
25 | |||||
26 | 1 | 9µs | 1 | 247µs | __PACKAGE__->belongs_to ( report => 'Tapper::Schema::ReportsDB::Result::Report', { 'foreign.id' => 'self.report_id' }); # spent 247µs making 1 call to DBIx::Class::Relationship::BelongsTo::belongs_to |
27 | |||||
28 | # -------------------- methods on results -------------------- | ||||
29 | |||||
30 | |||||
31 | sub groupreports { | ||||
32 | my ($self) = @_; | ||||
33 | |||||
34 | my @report_ids; | ||||
35 | my $rg = $self->result_source->schema->resultset('ReportgroupArbitrary')->search({ arbitrary_id => $self->arbitrary_id }); | ||||
36 | while (my $rg_entry = $rg->next) { | ||||
37 | push @report_ids, $rg_entry->report_id; | ||||
38 | } | ||||
39 | return $self->result_source->schema->resultset('Report')->search({ id => [ -or => [ @report_ids ] ] }); | ||||
40 | } | ||||
41 | |||||
42 | 1 | 14µs | 1; | ||
43 | |||||
44 | __END__ |