Commit c648c5bb authored by Chris McDonough's avatar Chris McDonough

Fixed false output problem whereby requestprofiler could ignore requests in a...

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!
parent ec6f44d2
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
""" Request log profiler script """ """ Request log profiler script """
__version__='$Revision: 1.5 $'[11:-2] __version__='$Revision: 1.6 $'[11:-2]
import string, sys, time, getopt, tempfile import string, sys, time, getopt, tempfile
...@@ -293,7 +293,7 @@ def parsebigmlogline(line): ...@@ -293,7 +293,7 @@ def parsebigmlogline(line):
def analyze(f, top, sortf, start=None, end=None, mode='cumulative'): def analyze(f, top, sortf, start=None, end=None, mode='cumulative'):
beginrequests = {} beginrequests = {}
cumulative = {} cumulative = {}
finished = {} finished = []
unfinished = {} unfinished = {}
while 1: while 1:
...@@ -318,11 +318,11 @@ def analyze(f, top, sortf, start=None, end=None, mode='cumulative'): ...@@ -318,11 +318,11 @@ def analyze(f, top, sortf, start=None, end=None, mode='cumulative'):
request.put(code, int(fromepoch), desc) request.put(code, int(fromepoch), desc)
if request.isfinished(): if request.isfinished():
del unfinished[id] del unfinished[id]
finished[id] = request finished.append(request)
request.active = len(unfinished) request.active = len(unfinished)
finished.update(unfinished) finished.extend(unfinished.values())
requests = finished.values() requests = finished
if mode == 'cumulative': if mode == 'cumulative':
for request in requests: for request in requests:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment