diff options
| author | Mac Mollison <mollison@cs.unc.edu> | 2010-02-11 20:21:14 -0500 |
|---|---|---|
| committer | Mac Mollison <mollison@cs.unc.edu> | 2010-02-11 20:21:14 -0500 |
| commit | c8eacbf0dce8e2cc1acf6bfb0232302bba592e34 (patch) | |
| tree | d78308bcc094481a1393dd824c9eb9bdf4e47387 /trace_reader.py | |
| parent | a92bbe8cf94f28b250cf023b3e4cfea148738468 (diff) | |
Num. CPUs produced by trace_reader, not hardcoded
Diffstat (limited to 'trace_reader.py')
| -rw-r--r-- | trace_reader.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/trace_reader.py b/trace_reader.py index 31f1812..2e5f65d 100644 --- a/trace_reader.py +++ b/trace_reader.py | |||
| @@ -35,6 +35,14 @@ import struct | |||
| 35 | # Generator function returning an iterable over records in a trace file. | 35 | # Generator function returning an iterable over records in a trace file. |
| 36 | def trace_reader(files): | 36 | def trace_reader(files): |
| 37 | 37 | ||
| 38 | # Yield a record indicating the number of CPUs, used by the G-EDF test | ||
| 39 | class Obj: pass | ||
| 40 | record = Obj() | ||
| 41 | record.record_type = "meta" | ||
| 42 | record.type_name = "num_cpus" | ||
| 43 | record.num_cpus = len(files) | ||
| 44 | yield record | ||
| 45 | |||
| 38 | # Create iterators for each file and a buffer to store records in | 46 | # Create iterators for each file and a buffer to store records in |
| 39 | file_iters = [] # file iterators | 47 | file_iters = [] # file iterators |
| 40 | file_iter_buff = [] # file iterator buffers | 48 | file_iter_buff = [] # file iterator buffers |
