Skip to content

Commit 4f4b545

Browse files
authored
DPL: Do not compute metrics if the GUI is not available (#14170)
1 parent 276c322 commit 4f4b545

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Framework/Core/src/CommonServices.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -848,9 +848,7 @@ auto flushMetrics(ServiceRegistryRef registry, DataProcessingStats& stats) -> vo
848848
}
849849
monitoring.send(std::move(metric));
850850
});
851-
if (DefaultsHelpers::onlineDeploymentMode() == false) {
852-
relayer.sendContextState();
853-
}
851+
relayer.sendContextState();
854852
monitoring.flushBuffer();
855853
O2_SIGNPOST_END(monitoring_service, sid, "flush", "done flushing metrics");
856854
};

Framework/Core/src/DataRelayer.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,9 @@ uint64_t DataRelayer::getCreationTimeForSlot(TimesliceSlot slot)
10341034

10351035
void DataRelayer::sendContextState()
10361036
{
1037+
if (!mContext.get<DriverConfig const>().driverHasGUI) {
1038+
return;
1039+
}
10371040
std::scoped_lock<O2_LOCKABLE(std::recursive_mutex)> lock(mMutex);
10381041
auto& states = mContext.get<DataProcessingStates>();
10391042
for (size_t ci = 0; ci < mTimesliceIndex.size(); ++ci) {

0 commit comments

Comments
 (0)