← 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:24:07 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/DBIx/Class/Cursor.pm
StatementsExecuted 10 statements in 179µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs14µsDBIx::Class::Cursor::::BEGIN@3DBIx::Class::Cursor::BEGIN@3
1117µs83µsDBIx::Class::Cursor::::BEGIN@6DBIx::Class::Cursor::BEGIN@6
1117µs14µsDBIx::Class::Cursor::::BEGIN@4DBIx::Class::Cursor::BEGIN@4
0000s0sDBIx::Class::Cursor::::allDBIx::Class::Cursor::all
0000s0sDBIx::Class::Cursor::::newDBIx::Class::Cursor::new
0000s0sDBIx::Class::Cursor::::nextDBIx::Class::Cursor::next
0000s0sDBIx::Class::Cursor::::resetDBIx::Class::Cursor::reset
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::Cursor;
2
3318µs216µs
# spent 14µs (12+2) within DBIx::Class::Cursor::BEGIN@3 which was called: # once (12µs+2µs) by base::import at line 3
use strict;
# spent 14µs making 1 call to DBIx::Class::Cursor::BEGIN@3 # spent 2µs making 1 call to strict::import
4321µs222µs
# spent 14µs (7+7) within DBIx::Class::Cursor::BEGIN@4 which was called: # once (7µs+7µs) by base::import at line 4
use warnings;
# spent 14µs making 1 call to DBIx::Class::Cursor::BEGIN@4 # spent 8µs making 1 call to warnings::import
5
63138µs283µs
# spent 83µs (7+76) within DBIx::Class::Cursor::BEGIN@6 which was called: # once (7µs+76µs) by base::import at line 6
use base qw/DBIx::Class/;
# spent 83µs making 1 call to DBIx::Class::Cursor::BEGIN@6 # spent 76µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 76µs
7
8=head1 NAME
9
10DBIx::Class::Cursor - Abstract object representing a query cursor on a
11resultset.
12
13=head1 SYNOPSIS
14
15 my $cursor = $schema->resultset('CD')->cursor();
16 my $first_cd = $cursor->next;
17
18=head1 DESCRIPTION
19
20A Cursor represents a query cursor on a L<DBIx::Class::ResultSet> object. It
21allows for traversing the result set with L</next>, retrieving all results with
22L</all> and resetting the cursor with L</reset>.
23
24Usually, you would use the cursor methods built into L<DBIx::Class::ResultSet>
25to traverse it. See L<DBIx::Class::ResultSet/next>,
26L<DBIx::Class::ResultSet/reset> and L<DBIx::Class::ResultSet/all> for more
27information.
28
29=head1 METHODS
30
31=head2 new
32
33Virtual method. Returns a new L<DBIx::Class::Cursor> object.
34
35=cut
36
37sub new {
38 die "Virtual method!";
39}
40
41=head2 next
42
43Virtual method. Advances the cursor to the next row. Returns an array of
44column values (the result of L<DBI/fetchrow_array> method).
45
46=cut
47
48sub next {
49 die "Virtual method!";
50}
51
52=head2 reset
53
54Virtual method. Resets the cursor to the beginning.
55
56=cut
57
58sub reset {
59 die "Virtual method!";
60}
61
62=head2 all
63
64Virtual method. Returns all rows in the L<DBIx::Class::ResultSet>.
65
66=cut
67
68sub all {
69 my ($self) = @_;
70 $self->reset;
71 my @all;
72 while (my @row = $self->next) {
73 push(@all, \@row);
74 }
75 $self->reset;
76 return @all;
77}
78
7912µs1;