Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Framework/Core/src/CommonServices.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,11 @@ auto sendRelayerMetrics(ServiceRegistryRef registry, DataProcessingStats& stats)
using namespace fair::mq::shmem;
auto& spec = registry.get<DeviceSpec const>();

auto hasMetric = [&runningWorkflow](const DataProcessingStats::MetricSpec& metric) -> bool {
return metric.metricId == static_cast<int>(ProcessingStatsId::AVAILABLE_MANAGED_SHM_BASE) + (runningWorkflow.shmSegmentId % 512);
};
// FIXME: Ugly, but we do it only every 5 seconds...
if (spec.name == "readout-proxy") {
if (std::find_if(stats.metricSpecs.begin(), stats.metricSpecs.end(), hasMetric) != stats.metricSpecs.end()) {
auto device = registry.get<RawDeviceService>().device();
long freeMemory = -1;
try {
Expand Down Expand Up @@ -1105,6 +1108,9 @@ o2::framework::ServiceSpec CommonServices::dataProcessingStats()
.sendInitialValue = true}};

for (auto& metric : metrics) {
if (metric.metricId == (int)ProcessingStatsId::AVAILABLE_MANAGED_SHM_BASE + (runningWorkflow.shmSegmentId % 512) && spec.name.compare("readout-proxy") != 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "readout-proxy" the only name we have?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is the only name we use in the online processing, and we only display it for this task in Grafana. The calibration workflows have different input proxy names each, and (at least so far) we don't look at their shm.

continue;
}
stats->registerMetric(metric);
}

Expand Down
Loading