diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-05-28 12:04:37 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-05-28 12:04:37 +0200 |
commit | c69331e4d925658b2bf26dcb387981f6530d7b9e (patch) | |
tree | d19c7f9b0bf51f68c104057e013630e009835268 /bin/eval-accounting-overhead.py | |
parent | 23927051ac3e64cabbaa6c30e8356dfe90ebfa6c (diff) |
use black(1) for uniform code formatting
Diffstat (limited to 'bin/eval-accounting-overhead.py')
-rwxr-xr-x | bin/eval-accounting-overhead.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/bin/eval-accounting-overhead.py b/bin/eval-accounting-overhead.py index d4b1d2c..7ea0807 100755 --- a/bin/eval-accounting-overhead.py +++ b/bin/eval-accounting-overhead.py @@ -18,17 +18,21 @@ import json import sys for filename in sys.argv[1:]: - with open(filename, 'r') as f: + with open(filename, "r") as f: measurement = json.load(f) raw_data = TimingData([filename]) preprocessed_data = raw_data.get_preprocessed_data() by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data) model = AnalyticModel(by_name, parameters, arg_count) static_model = model.get_static() - if 'setup' in model.names: - transition_duration = static_model('setup', 'duration') - elif 'init' in model.names: - transition_duration = static_model('init', 'duration') - get_energy_duration = static_model('getEnergy', 'duration') + if "setup" in model.names: + transition_duration = static_model("setup", "duration") + elif "init" in model.names: + transition_duration = static_model("init", "duration") + get_energy_duration = static_model("getEnergy", "duration") - print('{:60s}: {:.0f} / {:.0f} µs'.format(measurement['opt']['accounting'], transition_duration, get_energy_duration)) + print( + "{:60s}: {:.0f} / {:.0f} µs".format( + measurement["opt"]["accounting"], transition_duration, get_energy_duration + ) + ) |