summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/codegen.py4
-rw-r--r--lib/drift.py1
-rw-r--r--lib/harness.py17
-rwxr-xr-xlib/protocol_benchmarks.py1
-rw-r--r--lib/runner.py1
5 files changed, 12 insertions, 12 deletions
diff --git a/lib/codegen.py b/lib/codegen.py
index 5aba3a3..dec12c9 100644
--- a/lib/codegen.py
+++ b/lib/codegen.py
@@ -154,7 +154,8 @@ class SimulatedAccountingMethod:
"""
Return energy (=power * time), accounting for configured granularity.
- Does not use Module types and therefore does not consider overflows or data-type limitations"""
+ Does not use Module types and therefore does not consider overflows or data-type limitations
+ """
if self.energy_granularity == self.power_granularity * self.ts_granularity:
return power * time
return int(
@@ -632,7 +633,6 @@ class MultipassDriver:
)
for transition in self.pta.get_unique_transitions():
-
if transition.name == "getEnergy":
continue
diff --git a/lib/drift.py b/lib/drift.py
index 2361c4b..bac96e3 100644
--- a/lib/drift.py
+++ b/lib/drift.py
@@ -209,7 +209,6 @@ def compensate_drift_graph(
continue
for from_node in nodes_by_transition_index[transition_index - skip_count]:
for to_node in nodes_by_transition_index[transition_index]:
-
(from_trans_i, from_candidate_i, from_is_end) = transition_by_node[
from_node
]
diff --git a/lib/harness.py b/lib/harness.py
index 21bcd9e..b6245b9 100644
--- a/lib/harness.py
+++ b/lib/harness.py
@@ -3,6 +3,7 @@ Harnesses for various types of benchmark logs.
tbd
"""
+
import logging
import re
from .pubcode import Code128
@@ -93,9 +94,9 @@ class TransitionHarness:
][:undo_from]
for param_name in state_or_transition["parameter"].keys():
if type(state_or_transition["parameter"][param_name]) is list:
- state_or_transition["parameter"][
- param_name
- ] = state_or_transition["parameter"][param_name][:undo_from]
+ state_or_transition["parameter"][param_name] = (
+ state_or_transition["parameter"][param_name][:undo_from]
+ )
def reset(self):
"""
@@ -417,11 +418,11 @@ class OnboardTimerHarness(TransitionHarness):
for trace in self.traces:
for state_or_transition in trace["trace"]:
if "offline_aggregates" in state_or_transition:
- state_or_transition["offline_aggregates"][
- "duration"
- ] = state_or_transition["offline_aggregates"]["duration"][
- :undo_from
- ]
+ state_or_transition["offline_aggregates"]["duration"] = (
+ state_or_transition["offline_aggregates"]["duration"][
+ :undo_from
+ ]
+ )
if "start_offset" in trace:
trace["start_offset"] = trace["start_offset"][:undo_from]
diff --git a/lib/protocol_benchmarks.py b/lib/protocol_benchmarks.py
index 4a40de9..939fba5 100755
--- a/lib/protocol_benchmarks.py
+++ b/lib/protocol_benchmarks.py
@@ -171,7 +171,6 @@ class Avro(DummyProtocol):
class Thrift(DummyProtocol):
-
class_index = 1
def __init__(self, data):
diff --git a/lib/runner.py b/lib/runner.py
index c09fe4c..40e65d0 100644
--- a/lib/runner.py
+++ b/lib/runner.py
@@ -9,6 +9,7 @@ Functions:
get_monitor -- return Monitor class suitable for the selected multipass arch
get_counter_limits -- return arch-specific multipass counter limits (max value, max overflow)
"""
+
import json
import logging
import os