On Thu, Oct 07, 2004 at 07:10:30PM -0700, Simon Michael wrote:
> Hi all,
> I'd like to print a "this page was rendered in ... milliseconds"  as you 
> see on php sites. I think I'd get better accuracy by getting at least 
> the start time from ZPublisher because.. actually it may not help, but 
> I'm thinking about the case where a request generates a redirect and 
> another request. I'd like to time the whole thing.
> Do you know if there are any facilities for this already in ZPublisher ?
> Any tips or pointers welcome.

I dunno about ZPublisher, but ZServer uses its DebugLogger to
log at 4 times: receipt of request, all data received, response 
returned from zope, all data sent back to client.
Maybe you could monkeypatch DebugLogger to take the time of handoff to Zope 
(the 'I' line logged in continue_request) and insert it as a variable
in the HTTPRequest, which you could then read and use to print
your message from application code.
Dunno how to meet your goal of tracking time across a redirect...
unless maybe the redirect has a timestamp in the
query string.


Paul Winkler
Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to