Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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
13 changes: 13 additions & 0 deletions 13 Framework/Core/src/CommonServices.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "Framework/DeviceState.h"
#include "Framework/DeviceConfig.h"
#include "Framework/DefaultsHelpers.h"
#include "Framework/Signpost.h"

#include "TextDriverClient.h"
#include "WSDriverClient.h"
Expand Down Expand Up @@ -83,6 +84,7 @@ using Value = o2::monitoring::tags::Value;
O2_DECLARE_DYNAMIC_LOG(data_processor_context);
O2_DECLARE_DYNAMIC_LOG(stream_context);
O2_DECLARE_DYNAMIC_LOG(async_queue);
O2_DECLARE_DYNAMIC_LOG(policies);

namespace o2::framework
{
Expand Down Expand Up @@ -849,6 +851,16 @@ o2::framework::ServiceSpec CommonServices::dataProcessingStats()
if (deploymentMode != DeploymentMode::OnlineDDS && deploymentMode != DeploymentMode::OnlineECS && deploymentMode != DeploymentMode::OnlineAUX && deploymentMode != DeploymentMode::FST) {
arrowAndResourceLimitingMetrics = true;
}
// Input proxies should not report cpu_usage_fraction,
// because of the rate limiting which biases the measurement.
auto& spec = services.get<DeviceSpec const>();
bool enableCPUUsageFraction = true;
auto isProxy = [](DataProcessorLabel const& label) -> bool { return label == DataProcessorLabel{"input-proxy"}; };
if (std::find_if(spec.labels.begin(), spec.labels.end(), isProxy) != spec.labels.end()) {
O2_SIGNPOST_ID_GENERATE(mid, policies);
O2_SIGNPOST_EVENT_EMIT(policies, mid, "metrics", "Disabling cpu_usage_fraction metric for proxy %{public}s", spec.name.c_str());
enableCPUUsageFraction = false;
}

std::vector<DataProcessingStats::MetricSpec> metrics = {
MetricSpec{.name = "errors",
Expand Down Expand Up @@ -932,6 +944,7 @@ o2::framework::ServiceSpec CommonServices::dataProcessingStats()
.maxRefreshLatency = onlineRefreshLatency,
.sendInitialValue = true},
MetricSpec{.name = "cpu_usage_fraction",
.enabled = enableCPUUsageFraction,
.metricId = (int)ProcessingStatsId::CPU_USAGE_FRACTION,
.kind = Kind::Rate,
.scope = Scope::Online,
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.