List Info

Thread: is it normal?




is it normal?
country flaguser name
China
2007-08-13 22:27:24
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];
    $c->NEXT::prepare_write(_);
   
    my $elapsed = tv_interval( $starter, [gettimeofday] );
    $c->log->debug("prepare_write took
$elapsed.");
}

sub finalize_body {
    my $c = shift;
   
    my $starter = [gettimeofday];
    $c->NEXT::finalize_body(_);
   
    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/ 


_______________________________________________
List: Catalystlists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalystlists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/

Re: is it normal?
country flaguser name
China
2007-08-13 23:20:44
hmm, it's not a problem under mod_perl (just tested). so I
think it's 
fine. just ignore it plz.

Thanks.

Fayland Lam wrote:
> 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];
>    $c->NEXT::prepare_write(_);
>      my $elapsed = tv_interval( $starter,
[gettimeofday] );
>    $c->log->debug("prepare_write took
$elapsed.");
> }
> 
> sub finalize_body {
>    my $c = shift;
>      my $starter = [gettimeofday];
>    $c->NEXT::finalize_body(_);
>      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/

_______________________________________________
List: Catalystlists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalystlists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )