Skip to content

Commit

Permalink
feat(webvitals): Move back to storing weighted Performance scores ins…
Browse files Browse the repository at this point in the history
…tead of cdf (#2762)

Updates `normalize_performance_score` to go back to storing weighted
performance scores.
  • Loading branch information
edwardgou-sentry committed Nov 24, 2023
1 parent f2be998 commit 5e74635
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions relay-event-normalization/src/normalize/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit 5e74635

Please sign in to comment.