diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-08-14 15:03:28 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-08-14 15:03:28 +0200 |
commit | 830705b59483181eb5577173318c2df6255518af (patch) | |
tree | a20713527b61c213163ef3a325434a8d80b46f21 /lib/dfatool.py | |
parent | 680e7498a128c752e6eb43156ee990807c042769 (diff) |
add support for a posteriori parameters (e.g. TX success / retry count)
Diffstat (limited to 'lib/dfatool.py')
-rwxr-xr-x | lib/dfatool.py | 13 |
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. |