NAME
Catalyst::Plugin::tv_interval - call tv_interval of Time::HiRes to ease profiling.
SYNOPSIS
use Catalyst qw/-Debug tv_interval/;
# in controller later
sub somesub : Local {
my ($self, $c) = @_;
$c->tv_mark_point;
# do something
$c->tv_mark_point;
}
DESCRIPTION
This module uses the functions of tv_interval and [gettimeofday] in Time::HiRes. and print debug logs like as follows:
[debug] tv_interval: MyApp::Controller::Test from line 12 to 16 takes 0.013818
[debug] tv_interval: MyApp::Controller::Test from line 16 to 22 takes 1.000408
AUTHOR
Fayland, <fayland at gmail.com>
COPYRIGHT & LICENSE
Copyright 2007 Fayland and Zorpia Ltd. Company http://www.zorpia.com all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.