[ic] Logging slow pages

Stefan Hornburg (Racke) racke at linuxia.de
Tue Jun 13 09:55:44 EDT 2006


Bill Carr wrote:
> 
> On Jun 12, 2006, at 9:17 PM, Andrew Rich wrote:
> 
>> Hi Bill
>>
>> Just thought I would look at your webpage since you included the link!
>>
>> When I went to products, then clicked on the click 'HERE' for 
>> 'Bottlenose
>> Wine & Spirits Website' there was a problem with the next page.
>>
>> It appears the dot points under 'Included Site Features' have been 
>> truncated
>> at the start.
>>
>> I am using IE6
> 
> Thanks. Will check it out. Damn IE ;-) I'm on a Mac.
> 
> And thanks to Racke for his tip. I did this:
> AutoLoad <<EOA
> [perl global=1]
>     $Tmp->{StartTime} = time;
> [/perl]
> EOA

Global is not necessary for that. If the code above doesn't work, try $Tag->tmp();

> 
> AutoEnd <<EOA
> [perl global=1]
>     use Data::Dumper;
>     my $long_page_time = $Variable->{LONG_PAGE_TIME} || 5;
>     my $page_time = time - $Tmp->{StartTime};
>     if ($page_time >= $long_page_time) {
>     ::logDebug(qq{Slow page: $Variable->{IC_CATALOG}/$Global::Variable->
> {MV_PAGE}, Time: $page_time, remote_host: $CGI::remote_addr, CGI:} . 
> Dumper($CGI));
>     }
> [/perl]
> EOA

Global is probably not necessary for that. Replace Dumper() with uneval(),
which is available in regular [perl] tag.

Bye
	Racke

-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list