$visitor->searchForUID($uid);
$self->accept($visitor);
return $visitor->getResult;
-}
+}
sub addChild {
my $self = shift;
$c->stats->profile("completed second part of critical bit");
# more code
...
- $c->stats->profile(end => "mysub");
+ $c->stats->profile(end => "mysub");
}
Supposing mysub was called from the action "process" inside a Catalyst
=head2 new
-Constructor.
+Constructor.
$stats = Catalyst::Stats->new;
Marks a profiling point. These can appear in pairs, to time the block of code
between the begin/end pairs, or by themselves, in which case the time of
-execution to the previous profiling point will be reported.
+execution to the previous profiling point will be reported.
The argument may be either a single comment string or a list of name-value
pairs. Thus the following are equivalent: