diff options
-rw-r--r-- | lib/loader.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/loader.py b/lib/loader.py index a319c94..8aecbe0 100644 --- a/lib/loader.py +++ b/lib/loader.py @@ -1789,9 +1789,16 @@ class EnergyTraceWithTimer(EnergyTraceWithLogicAnalyzer): for tr in traces: for t in tr["trace"]: # print(t["online_aggregates"]["duration"][offline_index]) - timestamps.append( - timestamps[-1] + t["online_aggregates"]["duration"][offline_index] - ) + try: + timestamps.append( + timestamps[-1] + + t["online_aggregates"]["duration"][offline_index] + ) + except IndexError: + self.errors.append( + f"""offline_index {offline_index} missing in trace {tr["id"]}""" + ) + return list() # print(timestamps) |