From a08f911d6cc144708793f6f615a9542165aafa2b Mon Sep 17 00:00:00 2001 From: mendess Date: Fri, 6 Oct 2023 11:38:51 +0100 Subject: [PATCH 1/2] Fix clippy redundant guard warning --- daphne_worker/src/roles/aggregator.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/daphne_worker/src/roles/aggregator.rs b/daphne_worker/src/roles/aggregator.rs index e95b7ab54..5264ae189 100644 --- a/daphne_worker/src/roles/aggregator.rs +++ b/daphne_worker/src/roles/aggregator.rs @@ -142,11 +142,10 @@ impl DapReportInitializer for DaphneWorker<'_> { if let Some(initialized_report) = initialized_reports.get_mut(&metadata.id) { let processed = match initialized_report { EarlyReportStateInitialized::Ready { .. } => false, - EarlyReportStateInitialized::Rejected { failure, .. } - if matches!(failure, TransitionFailure::ReportReplayed) => - { - true - } + EarlyReportStateInitialized::Rejected { + failure: TransitionFailure::ReportReplayed, + .. + } => true, EarlyReportStateInitialized::Rejected { .. } => { continue; } From e1824c681c94cecff667b1d48773ed71303e7b2d Mon Sep 17 00:00:00 2001 From: mendess Date: Wed, 4 Oct 2023 17:02:48 +0100 Subject: [PATCH 2/2] Change aggregation job size metric The previous sizes were mostly useless for monitoring as they included amounts of reports that were no where near close to being supported, these sizes should let us distinguish between very small jobs, medium size jobs and jobs stretching the capacity of the system. --- daphne/src/metrics.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daphne/src/metrics.rs b/daphne/src/metrics.rs index 8229cae2b..4776eec45 100644 --- a/daphne/src/metrics.rs +++ b/daphne/src/metrics.rs @@ -54,8 +54,9 @@ impl DaphneMetrics { format!("{front}aggregation_job_batch_size"), "Number of records in an incoming AggregationJobInitReq.", &["host"], - exponential_buckets(5.0, 3.0, 6) - .expect("this shouldn't panic for these hardcoded values"), // <250, <500, ... <1500, +Inf + // <1, <2, <4, <8, ... <256, +Inf + exponential_buckets(1.0, 2.0, 8) + .expect("this shouldn't panic for these hardcoded values"), registry ) .map_err(|e| fatal_error!(err = ?e, "failed to register aggregation_job_batch_size"))?;