Fred,

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?

1) use Time::HiRes. It gives you milliseconds. You want that.

2) if you do not want to change your templates to output the time, you can just "print" your timing message after the output has been sent,
for example in teardown().
(in cgipostrun the output has not been sent yet, but it will most likely have been flatted into a string by $tmpl->output(), so you will have trouble
putting in more parameters... )


Thilo


--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to