[Catalyst] is it normal?

Fayland Lam fayland at gmail.com
Tue Aug 14 04:27:24 GMT 2007

well, I'm trying to benchmark my App.
so write something like this as a plugin:

sub prepare_write {
    my $c = shift;
    my $starter = [gettimeofday];
    my $elapsed = tv_interval( $starter, [gettimeofday] );
    $c->log->debug("prepare_write took $elapsed.");

sub finalize_body {
    my $c = shift;
    my $starter = [gettimeofday];
    my $elapsed = tv_interval( $starter, [gettimeofday] );
    $c->log->debug("finalize_body took $elapsed.");

and try to visit a URL, then I get:

[debug] finalize_uploads took 0.000415.
[debug] finalize_cookies took 0.000413.
[debug] finalize_headers took 0.001498.
[debug] finalize_body took 2.652885.
[info] Request took 3.533799s (0.283/s)

isn't the finalize_body taking too much time? or it's normal?
if it's abnormal, how can I improve the finalize_body? better IO disk?

Thanks a lot.

Fayland Lam // http://www.fayland.org/ 

More information about the Catalyst mailing list