From 5e74635a38e75e13803182d2ca811cd89a8c1d31 Mon Sep 17 00:00:00 2001 From: edwardgou-sentry <83961295+edwardgou-sentry@users.noreply.github.com> Date: Fri, 24 Nov 2023 10:18:35 -0500 Subject: [PATCH] feat(webvitals): Move back to storing weighted Performance scores instead of cdf (#2762) Updates `normalize_performance_score` to go back to storing weighted performance scores. --- .../src/normalize/processor.rs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/relay-event-normalization/src/normalize/processor.rs b/relay-event-normalization/src/normalize/processor.rs index 301e6dc538..d082aebf0c 100644 --- a/relay-event-normalization/src/normalize/processor.rs +++ b/relay-event-normalization/src/normalize/processor.rs @@ -779,7 +779,7 @@ fn normalize_performance_score( measurements.insert( format!("score.{}", component.measurement), Measurement { - value: cdf.into(), + value: component_score.into(), unit: (MetricUnit::Fraction(FractionUnit::Ratio)).into(), } .into(), @@ -2004,19 +2004,19 @@ mod tests { "unit": "millisecond", }, "score.cls": { - "value": 0.8745668242977945, + "value": 0.21864170607444863, "unit": "ratio", }, "score.fcp": { - "value": 0.7167236962527221, + "value": 0.10750855443790831, "unit": "ratio", }, "score.fid": { - "value": 0.6552453782760849, + "value": 0.19657361348282545, "unit": "ratio", }, "score.lcp": { - "value": 0.03079632190462195, + "value": 0.009238896571386584, "unit": "ratio", }, "score.total": { @@ -2152,19 +2152,19 @@ mod tests { "unit": "millisecond", }, "score.cls": { - "value": 0.8745668242977945, + "value": 0.21864170607444863, "unit": "ratio", }, "score.fcp": { - "value": 0.7167236962527221, + "value": 0.10750855443790831, "unit": "ratio", }, "score.fid": { - "value": 0.6552453782760849, + "value": 0.19657361348282545, "unit": "ratio", }, "score.lcp": { - "value": 0.03079632190462195, + "value": 0.009238896571386584, "unit": "ratio", }, "score.total": { @@ -2300,19 +2300,19 @@ mod tests { "unit": "millisecond", }, "score.cls": { - "value": 0.8745668242977945, + "value": 0.21864170607444863, "unit": "ratio", }, "score.fcp": { - "value": 0.7167236962527221, + "value": 0.10750855443790831, "unit": "ratio", }, "score.fid": { - "value": 0.6552453782760849, + "value": 0.19657361348282545, "unit": "ratio", }, "score.lcp": { - "value": 0.03079632190462195, + "value": 0.009238896571386584, "unit": "ratio", }, "score.total": {