ZTimingHooks

Zope render-time-feature

ZTimingHook is a monkey patch for zope which add time measurement to the request. This render-time can then be displayed into the resuling page.

What is ZTimingHooks

ZTimingHooks provides the page render-time-feature (well known from PHP based systems) into the zope world. The render time is measured from the start of the request until the completly rendered page is up to be delivered to the browser.

Usage

To add the rendered time to your site, add somewhere into the resulting output the result of the python call cgi.escape("0.087915"). From a PageTemplate this can be done by adding something like <span tal:replace="string:0.087915" /> for instance to the footer of your site.

import cgi
cgi.escape("0.087915")

<span tal:replace="string:0.087915" />

This allows you to create footers containg things like "Page rendered in 0.085102 seconds.".

Fedback wanted

You are using ZTimingHooks? Please provide me feedback either per mail or by commenting this page. Thanks!

Download

File ZTimingHooks-0.1.tar.gz
File created on Fri 01. Apr 2005 21:35 by Userlongsleep


Copyright Simon Eisenmann http://longsleep.org/ - License under Creative Commons License - valid: xhtml, css

powered by icoya