I've just announced our Call Profiler product on zope.org and the zope 
announce list (waiting for people in different timezones to authorise them :)
  ( http://www.zope.org/Members/richard/CallProfiler/  for the impatient)

In a nutshell, it patches the rendering guts of DTMLMethod, ZSQL, etc. and 
the ZPublisher so that we can get timing marks for requests as the calls are 
made. The patching is quite simple (once I got the hang of it ;) and 
reversible, and means that there's no changes required to the Zope core to 
enable the testing (which our initial versions did).

It does pose a question though: would it be better to have support for this 
stuff in the core, or is it OK for a product like this to dynamically patch 
the call methods when it needs to?

On one hand, the performance hit when dynamically patching the methods is 
zero when the product is not "active", but it does mean diddling with methods 
that really probably should be left alone. On the other hand, having changes 
to the core code to test for profiling being enabled introduces a small 
performance hit even when profiling is not activated.

Any comments?


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

Reply via email to