Thanks to Cees and Thilo for their inputs.
Here's my JGE (just good enough) solution (see below).
I placed this in my super class that all my instances inherit from.
Note that this output only measures in seconds. The results are replaced into the comment
<!-- ScriptRunTime --> in the output. Any code after cgiapp_postrun isn't counted.
sub cgiapp_postrun {
my $self = shift;
my $output_ref = shift;
# $script_starttime = $^T
# times measured in seconds
my $script_duration = time() - $^T;
$$output_ref =~ s#<!-- ScriptRunTime -->#<BR>Server process time: $script_duration seconds<BR>#;
} #end cgiapp_postrun
=============================================================================
Fred Kleindenst suppressed
Internet Platforms
310.302.3801
-----Original Message-----
From: Kleindenst, Fred
Sent: Tuesday, June 29, 2004 3:41 PM
Cc: suppressed
Subject: [cgiapp] Measuring the time taken by the CGI...
Hello,
I'd like to measure the time taken to execute each particular hit to cgi::app and display the result.
My thoughts on how to implement this are roughly:
* get the time $T1 in cgiprerun - store in $self
* get the time $T2 in cgipostrun and compute the difference
* output the result as a template param. (is my output out already?)
Anyone done this or something like it already? Thoughts?
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.