You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Where 993 = 99.3% pass rate, based on weighted calculations.)
Meanwhile, the Compat 2021 dashboard shows the following scores:
feature
chrome
firefox
safari
aspect-ratio
19
19
19
flexbox
19
19
18
grid
19
18
19
position-sticky
20
17
20
transforms
19
19
16
total
96
92
92
What I don't understand is how the labeled tests, given the pass rates quoted above, translate into the points given. There seems to be another layer of computation that's happening.
For example, let's look at Safari's transform score. We are passing 847 of 1000 tests, which is 85%. Yet, we have a score of 16, which is the equivalent of 80%. Applying this across all the tests, and it seems both Safari and Firefox are being underscored.
Philip you mentioned in the meeting perhaps this is happening because the wrong tests are labeled?
@jensimmons thanks for filing the issue. I have taken a look at the number of tests used in each scoring script, and it turns out my suspicion was wrong. The exact same number of tests are going into it for both scripts:
feature
tests
aspect-ratio
159
css-flexbox
1051
css-grid
902
css-transforms
755
position-sticky
42
I didn't check that the test names are the same, but I now doubt a test mismatch is the right explanation here. I'll self-assign this and look into if the scores end up being different even for the exact same runs, which I haven't confirmed yet.
So the way this worked, because each area was first scored 0-20, the only way to increase the score was to pass a 5% threshold in an individual area. This is something I'm proposing to change.
If we were to score just these 5 areas using the method I'm suggesting, it would be:
letchrome=[993,978,980,981,1000];letfirefox=[970,990,912,961,892];letsafari=[965,948,963,887,1000];functionsum(list){returnlist.reduce((acc,x)=>acc+x,0);}Math.floor(sum(chrome)/5);// 986 i.e. 98.6%Math.floor(sum(firefox)/5);// 945 i.e. 94.5%Math.floor(sum(safari)/5);// 952 i.e. 95.2%
I believe this is better since smaller improvements in the individual area scores get reflected in the overall score. Note that this isn't just due to adding a decimal point (which we can debate) but also because we get rid of the truncation to a 0-20 score for each area.
For example, let's look at Safari's transform score. We are passing 847 of 1000 tests, which is 85%. Yet, we have a score of 16, which is the equivalent of 80%. Applying this across all the tests, and it seems both Safari and Firefox are being underscored.
Taking this Safari run as the example since it's what I used in the previous comments, there are 755 tests. The Safari score in our metrics are:
0.8872781623 as computed for Compat 2021
17 for the overall Compat 2021 metric, from Math.floor(0.8872781623 * 20), which is 85%
88.7% in the way I'm suggested we compute metrics for Interop 2022
So this is mainly explained by that truncation to a 0-20 score per area.
Unfortunately, it's hard to read that 88.7% from wpt.fyi, because wpt.fyi can't show normalized scores, where each test counts the same regardless of number of subtests. This is a feature request in web-platform-tests/wpt.fyi#2290 and I think we might get to it this year, but not before the launch of Interop 2022. It is possible to verify the score with careful counting of tests and subtests, however.
Activity
foolip commentedon Jan 19, 2022
@jensimmons thanks for filing the issue. I have taken a look at the number of tests used in each scoring script, and it turns out my suspicion was wrong. The exact same number of tests are going into it for both scripts:
I didn't check that the test names are the same, but I now doubt a test mismatch is the right explanation here. I'll self-assign this and look into if the scores end up being different even for the exact same runs, which I haven't confirmed yet.
foolip commentedon Feb 3, 2022
I have taken a close look at this. The 4 data files that get loaded by https://wpt.fyi/compat2021 are:
summary-experimental.csvsummary-stable.csvunified-scores-experimental.csvunified-scores-stable.csvThe summary files have the same data as the last entry in the unified scores files.
Here's the data from
summary-experimental.csv:That data was from 2022-01-31 (sha 29ce70d915) so that's what I've compared.
Here are the summary numbers I get from the new script, from the same commit:
All the numbers seem to match.
Next I'll look at the total score and explain how it was computed for Compat 2021 and check if it'll match for Interop 2022.
foolip commentedon Feb 3, 2022
Here's how the summary score was computed for Compat 2021:
https://github.com/web-platform-tests/wpt.fyi/blob/39242385b97882de45af97f7713bc8e67eff7564/webapp/components/interop-2022.js#L121-L133
I can get the same scores as are shown on the Compat 2021 dashboard like this:
So the way this worked, because each area was first scored 0-20, the only way to increase the score was to pass a 5% threshold in an individual area. This is something I'm proposing to change.
If we were to score just these 5 areas using the method I'm suggesting, it would be:
I believe this is better since smaller improvements in the individual area scores get reflected in the overall score. Note that this isn't just due to adding a decimal point (which we can debate) but also because we get rid of the truncation to a 0-20 score for each area.
foolip commentedon Feb 3, 2022
One thing remains to be explained here:
Taking this Safari run as the example since it's what I used in the previous comments, there are 755 tests. The Safari score in our metrics are:
Math.floor(0.8872781623 * 20), which is 85%So this is mainly explained by that truncation to a 0-20 score per area.
Unfortunately, it's hard to read that 88.7% from wpt.fyi, because wpt.fyi can't show normalized scores, where each test counts the same regardless of number of subtests. This is a feature request in web-platform-tests/wpt.fyi#2290 and I think we might get to it this year, but not before the launch of Interop 2022. It is possible to verify the score with careful counting of tests and subtests, however.