summaryrefslogtreecommitdiff
path: root/lib/dfatool.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-08-14 15:03:28 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-08-14 15:03:28 +0200
commit830705b59483181eb5577173318c2df6255518af (patch)
treea20713527b61c213163ef3a325434a8d80b46f21 /lib/dfatool.py
parent680e7498a128c752e6eb43156ee990807c042769 (diff)
add support for a posteriori parameters (e.g. TX success / retry count)
Diffstat (limited to 'lib/dfatool.py')
-rwxr-xr-xlib/dfatool.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/dfatool.py b/lib/dfatool.py
index 1dc2291..e318e81 100755
--- a/lib/dfatool.py
+++ b/lib/dfatool.py
@@ -519,13 +519,18 @@ class TimingData:
trace['id'] = i
for log_entry in trace['trace']:
paramkeys = sorted(log_entry['parameter'].keys())
- paramvalues = [soft_cast_int(log_entry['parameter'][x]) for x in paramkeys]
- if arg_support_enabled and 'args' in log_entry:
- paramvalues.extend(map(soft_cast_int, log_entry['args']))
if not 'param' in log_entry['offline_aggregates']:
log_entry['offline_aggregates']['param'] = list()
if 'duration' in log_entry['offline_aggregates']:
for i in range(len(log_entry['offline_aggregates']['duration'])):
+ paramvalues = list()
+ for paramkey in paramkeys:
+ if type(log_entry['parameter'][paramkey]) is list:
+ paramvalues.append(soft_cast_int(log_entry['parameter'][paramkey][i]))
+ else:
+ paramvalues.append(soft_cast_int(log_entry['parameter'][paramkey]))
+ if arg_support_enabled and 'args' in log_entry:
+ paramvalues.extend(map(soft_cast_int, log_entry['args']))
log_entry['offline_aggregates']['param'].append(paramvalues)
def _preprocess_0(self):
@@ -537,7 +542,7 @@ class TimingData:
def get_preprocessed_data(self, verbose = True):
"""
- Return a list of DFA traces annotated with timing, and parameter data.
+ Return a list of DFA traces annotated with timing and parameter data.
Suitable for the PTAModel constructor.
See PTAModel(...) docstring for format details.