[Zope-Checkins] CVS: Zope/utilities - requestprofiler.py:1.5.4.1
Chris McDonough
chrism@zope.com
Tue, 21 Aug 2001 15:12:43 -0400
Update of /cvs-repository/Zope/utilities
In directory cvs.zope.org:/tmp/cvs-serv21494
Modified Files:
Tag: Zope-2_4-branch
requestprofiler.py
Log Message:
Fixed false output problem whereby requestprofiler could mistakenly ignore requests that had the same id in long logs. Collector #2536. Thanks to Dyon Balding!
=== Zope/utilities/requestprofiler.py 1.5 => 1.5.4.1 ===
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: