[Zope-CVS] CVS: Products/PublisherProfiler - __init__.py:1.2

Shane Hathaway shane@cvs.zope.org
Wed, 21 Aug 2002 17:52:27 -0400


Update of /cvs-repository/Products/PublisherProfiler
In directory cvs.zope.org:/tmp/cvs-serv19968

Modified Files:
	__init__.py 
Log Message:
Tweaked sorting and added a comment describing why this is better than
ZPublisher's profiler.


=== Products/PublisherProfiler/__init__.py 1.1.1.1 => 1.2 ===
--- Products/PublisherProfiler/__init__.py:1.1.1.1	Wed Aug 21 17:30:36 2002
+++ Products/PublisherProfiler/__init__.py	Wed Aug 21 17:52:27 2002
@@ -17,6 +17,12 @@
 request will be profiled and the results will be sent to the specified
 log file.  Useful for discovering performance bottlenecks.
 
+What this does that ZPublisher's profiler does not do:
+
+- Thread-safe.
+- Appends stats to a log file.
+- Includes the REQUEST data along with the stats.
+
 $Id$
 """
 
@@ -58,7 +64,7 @@
     end = clock()
     stats = pstats.Stats(prof)
     stats.strip_dirs()
-    stats.sort_stats('time')  # or 'cumulative', 'stdname', or 'calls' 
+    stats.sort_stats('cumulative')  # or 'time', 'stdname', or 'calls' 
     out = StringIO()
     # Redirect stdout for only this thread.
     sys.stdout.setAlternative(out)