summaryrefslogtreecommitdiff
path: root/bin/eval-accounting-overhead.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-05-28 12:04:37 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-05-28 12:04:37 +0200
commitc69331e4d925658b2bf26dcb387981f6530d7b9e (patch)
treed19c7f9b0bf51f68c104057e013630e009835268 /bin/eval-accounting-overhead.py
parent23927051ac3e64cabbaa6c30e8356dfe90ebfa6c (diff)
use black(1) for uniform code formatting
Diffstat (limited to 'bin/eval-accounting-overhead.py')
-rwxr-xr-xbin/eval-accounting-overhead.py18
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
+ )
+ )