summaryrefslogtreecommitdiff
path: root/bin/analyze-timing.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-08-15 11:49:05 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-08-15 11:49:05 +0200
commitd38c3a191c44806d87584b7bd6052072820bcea3 (patch)
tree2f280d7612212a6d9b8d76f36956255aeff75d69 /bin/analyze-timing.py
parent45952580a0acd645d032509908d0a82f72bd9c74 (diff)
Fix generate-dfa-benchmark leaving out benchmark parts when splitting runs
Diffstat (limited to 'bin/analyze-timing.py')
-rwxr-xr-xbin/analyze-timing.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/analyze-timing.py b/bin/analyze-timing.py
index 7e8174d..465932b 100755
--- a/bin/analyze-timing.py
+++ b/bin/analyze-timing.py
@@ -63,7 +63,7 @@ Options:
--export-energymodel=<model.json>
Export energy model. Requires --hwmodel.
---filter-param=<parameter name>=<parameter value>
+--filter-param=<parameter name>=<parameter value>[,<parameter name>=<parameter value>...]
Only consider measurements where <parameter name> is <parameter value>
All other measurements (including those where it is None, that is, has
not been set yet) are discarded. Note that this may remove entire
@@ -192,7 +192,9 @@ if __name__ == '__main__':
opts['corrcoef'] = False
if 'filter-param' in opts:
- opts['filter-param'] = opts['filter-param'].split('=')
+ opts['filter-param'] = list(map(lambda x: x.split('='), opts['filter-param'].split(',')))
+ else:
+ opts['filter-param'] = list()
except getopt.GetoptError as err:
print(err)
@@ -203,9 +205,9 @@ if __name__ == '__main__':
preprocessed_data = raw_data.get_preprocessed_data()
by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data, ignored_trace_indexes)
- if 'filter-param' in opts:
- param_index = parameters.index(opts['filter-param'][0])
- param_value = soft_cast_int(opts['filter-param'][1])
+ for param_name_and_value in opts['filter-param']:
+ param_index = parameters.index(param_name_and_value[0])
+ param_value = soft_cast_int(param_name_and_value[1])
names_to_remove = set()
for name in by_name.keys():
indices_to_keep = list(map(lambda x: x[param_index] == param_value, by_name[name]['param']))