From f66071b18fe2fd73c403010db4e03995a4fb9999 Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flow@cs.fau.de>
Date: Mon, 12 Apr 2021 11:39:21 +0200
Subject: [PATCH] [Runtime] Only print IO stats if emper::IO is true

---
 emper/Runtime.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/emper/Runtime.cpp b/emper/Runtime.cpp
index a49128b9..31c7b1c2 100644
--- a/emper/Runtime.cpp
+++ b/emper/Runtime.cpp
@@ -165,7 +165,10 @@ Runtime::~Runtime() {
 	// objects bound to the runtime's lifetime
 	if constexpr (emper::STATS) {
 		printLastRuntimeStats();
-		emper::io::Stats::printStats(globalIo, ioContexts);
+
+		if constexpr (emper::IO) {
+			emper::io::Stats::printStats(globalIo, ioContexts);
+		}
 	}
 
 	for (unsigned int i = 0; i < workerCount; ++i) {
-- 
GitLab