From b0261e81ec5ce5b7bc9d80ecf770d6a2d2e10308 Mon Sep 17 00:00:00 2001
From: Sebastian Rieger <sebastian.rieger@informatik.hs-fulda.de>
Date: Thu, 4 Jan 2018 16:46:22 +0100
Subject: [PATCH] added global timeout to detect otherwise endless running
 checks, when nodes crash or resources are depleted

---
 gns3-bench.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gns3-bench.py b/gns3-bench.py
index 8de8789..1294c61 100644
--- a/gns3-bench.py
+++ b/gns3-bench.py
@@ -147,6 +147,9 @@ for run in range(1, NUMBER_OF_BENCHMARK_RUNS + 1):
         # print(os.popen("top -b -n 1 | head -20 >> gns3bench-perf.log"))
 
         time_globalTimeout = time.time()
+        print("(check duration: {:d} sec, timeout: {:d} sec)".format(int((time_globalTimeout - time_active)),
+                                                                     int(GLOBAL_TIMEOUT)))
+
         # if usability of nodes is checked longer than global timeout, exit
         # this can happen if nodes get stuck, e.g., due to high load, missing resources etc.
         if time_globalTimeout - time_active > GLOBAL_TIMEOUT:
-- 
GitLab