On Tue, Jun 12, 2007 at 06:39:57PM +0200, Thierry Florac wrote:
> I'm looking for a simple solution to profile a Zope3 application, some
> kind of 'ZopeProfiler' product which was available for Zope2.

That would be a nice thing to have.

> Any link or advise would be welcome...

So far the easiest way I've found is to use my @profile adapter on the
view's __call__:

  from profilehooks import profile

  class MyViewClass(BrowserView):
      template = ViewPageTemplateFile('templates/mytemplate.pt')

      # if you specify immediate, each request will print the profile to stdout
      # if you don't, you'll get an aggregate profile when you stop the server
      def __call__(self):
          return self.template()

You can find profilehooks.py (MIT licence) with some usage examples at

You might also be interested in

Marius Gedminas
Beware of bugs in the above code; I have only proved it correct, not tried it.
                -- Donald Knuth

Attachment: signature.asc
Description: Digital signature

Zope3-users mailing list

Reply via email to