summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/analyze-archive.py8
-rwxr-xr-xlib/dfatool.py2
2 files changed, 10 insertions, 0 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index 8ced365..031bef5 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -253,6 +253,14 @@ if __name__ == '__main__':
param,
model.stats.param_dependence_ratio(state, 'power', param)))
for trans in model.transitions():
+ # Mean power is not a typical transition attribute, but may be present for debugging or analysis purposes
+ try:
+ print('{:10s}: {:.0f} µW ({:.2f})'.format(
+ trans,
+ static_model(trans, 'power'),
+ model.stats.generic_param_dependence_ratio(trans, 'power')))
+ except KeyError:
+ pass
print('{:10s}: {:.0f} / {:.0f} / {:.0f} pJ ({:.2f} / {:.2f} / {:.2f})'.format(
trans, static_model(trans, 'energy'),
static_model(trans, 'rel_energy_prev'),
diff --git a/lib/dfatool.py b/lib/dfatool.py
index abf8c10..340a6e5 100755
--- a/lib/dfatool.py
+++ b/lib/dfatool.py
@@ -1381,6 +1381,8 @@ def _add_trace_data_to_aggregate(aggregate, key, element):
else:
# TODO do not hardcode values
aggregate[key]['attributes'] = ['duration', 'energy', 'rel_energy_prev', 'rel_energy_next']
+ # Uncomment this line if you also want to analyze mean transition power
+ #aggrgate[key]['attributes'].append('power')
if 'plan' in element and element['plan']['level'] == 'epilogue':
aggregate[key]['attributes'].insert(0, 'timeout')
attributes = aggregate[key]['attributes'].copy()