From e0fb86a728ade33eaeda069620551f551a18fb53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= <henrik@tjaders.com> Date: Mon, 26 Feb 2018 11:15:31 +0100 Subject: [PATCH] Nicely print Claims and Total time --- klee_stm_gdb.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/klee_stm_gdb.py b/klee_stm_gdb.py index e7dde2b..2739369 100644 --- a/klee_stm_gdb.py +++ b/klee_stm_gdb.py @@ -178,10 +178,23 @@ def stop_event(evt): if file_index_current < len(file_list) - 1: gather_data() else: + offset = 1 print("\nFinished all ktest files!\n") print("Claims:") - for x in outputdata: - print("%s" % x) + for index, obj in enumerate(outputdata): + if obj[4] == 'Exit': + claim_time = (obj[2] - + outputdata[index - (offset)][2]) + # print("Claim time: %s" % claim_time) + print("%s Claim time: %s" % (obj, claim_time)) + offset += 2 + elif obj[4] == 'Finish' and not obj[2] == 0: + offset = 1 + tot_time = obj[2] + print("%s Total time: %s" % (obj, tot_time)) + else: + print("%s" % (obj)) + gdb.execute("quit") return -- GitLab