diff --git a/Framework/Core/src/CommonServices.cxx b/Framework/Core/src/CommonServices.cxx index 22324cd84b390..ec2bc78c3c860 100644 --- a/Framework/Core/src/CommonServices.cxx +++ b/Framework/Core/src/CommonServices.cxx @@ -852,7 +852,10 @@ auto flushMetrics(ServiceRegistryRef registry, DataProcessingStats& stats) -> vo } monitoring.send(std::move(metric)); }); - relayer.sendContextState(); + // Do not even calculate GUI related quantities if the GUI is disabled. + if (registry.get().driverHasGUI) { + relayer.sendContextState(); + } monitoring.flushBuffer(); O2_SIGNPOST_END(monitoring_service, sid, "flush", "done flushing metrics"); };