[Zope-Checkins] CVS: Zope/utilities - requestprofiler.py:1.6

Chris McDonough chrism@zope.com
Tue, 21 Aug 2001 15:11:34 -0400


Update of /cvs-repository/Zope/utilities
In directory cvs.zope.org:/tmp/cvs-serv21436

Modified Files:
	requestprofiler.py 
Log Message:
Fixed false output problem whereby requestprofiler could ignore requests in a log that had the same "id" as one another.  Collector #2536.  Thanks to Dyon Balding!


=== Zope/utilities/requestprofiler.py 1.5 => 1.6 ===
     beginrequests = {}
     cumulative = {}
-    finished = {}
+    finished = []
     unfinished = {}
     
     while 1:
@@ -318,11 +318,11 @@
         request.put(code, int(fromepoch), desc)
         if request.isfinished():
             del unfinished[id]
-            finished[id] = request
+            finished.append(request)
             request.active = len(unfinished)
             
-    finished.update(unfinished)
-    requests = finished.values()
+    finished.extend(unfinished.values())
+    requests = finished
 
     if mode == 'cumulative':
         for request in requests: