diff options
author | Mac Mollison <mollison@cs.unc.edu> | 2010-03-27 20:01:41 -0400 |
---|---|---|
committer | Mac Mollison <mollison@cs.unc.edu> | 2010-03-27 20:02:21 -0400 |
commit | eb7b8cdf0517bc3bebb8d782feffab6643366617 (patch) | |
tree | 7c4359eaaeb0b8d1814fdd525389778c9f875a88 | |
parent | 15743fd8cfff5b90a18b24c90d40a6adcd6bd314 (diff) |
Sort next 200 records, not 100
This allows the st_many_gsn trace to be parsed.
-rw-r--r-- | unit_trace/trace_reader.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unit_trace/trace_reader.py b/unit_trace/trace_reader.py index 5927250..62c7ea7 100644 --- a/unit_trace/trace_reader.py +++ b/unit_trace/trace_reader.py | |||
@@ -60,17 +60,17 @@ def trace_reader(files): | |||
60 | file_iters.append(file_iter) | 60 | file_iters.append(file_iter) |
61 | file_iter_buff.append([file_iter.next()]) | 61 | file_iter_buff.append([file_iter.next()]) |
62 | 62 | ||
63 | # We keep 100 records in each buffer and then keep the buffer sorted | 63 | # We keep 200 records in each buffer and then keep the buffer sorted |
64 | # This is because records may have been recorded slightly out of order | 64 | # This is because records may have been recorded slightly out of order |
65 | # This cannot guarantee records are produced in order, but it makes it | 65 | # This cannot guarantee records are produced in order, but it makes it |
66 | # overwhelmingly probably. | 66 | # overwhelmingly probably. |
67 | # The 'try' and 'except' catches the case where there are less than 100 | 67 | # The 'try' and 'except' catches the case where there are less than 200 |
68 | # records in a file (throwing a StopIteration) which otherwise would | 68 | # records in a file (throwing a StopIteration) which otherwise would |
69 | # propogate up and cause the trace_reader generator itself to throw a | 69 | # propogate up and cause the trace_reader generator itself to throw a |
70 | # StopIteration. | 70 | # StopIteration. |
71 | for x in range(0,len(file_iter_buff)): | 71 | for x in range(0,len(file_iter_buff)): |
72 | try: | 72 | try: |
73 | for y in range(0,100): | 73 | for y in range(0,200): |
74 | file_iter_buff[x].append(file_iters[x].next()) | 74 | file_iter_buff[x].append(file_iters[x].next()) |
75 | except StopIteration: | 75 | except StopIteration: |
76 | pass | 76 | pass |