Update stats script - #4030
Conversation
|
This ready for review again. |
Elchi3
left a comment
There was a problem hiding this comment.
Thanks Daniel, this works as described. You may need to merge latest main again to see if it still functions.
I have to say the meaning of the cumulative days is not obvious to me. I have nothing to put it in relation to.
Inspired by openwebdocs/mdn-bcd-collector#3249, I would have proposed:
Counts:
- featuresCount
- groupsCount
- compatKeysCount
- mappedCompatKeysCount
- unmappedCompatKeysCount
- unmappedNormalCompatKeysCount
- unmappedDiscoragedCompatKeysCount
- caniuseIdsCount
- unmappedCaniuseIdsCount
Ratios:
- mappedCompatKeysRatio
- unmappedCompatKeysRatio
- unmappedNormalCompatKeysRatio
- unmappedDiscoragedCompatKeysRatio
- unmappedCaniuseIdsRatio
|
OK, I've pushed a change to regularize the names (as you suggested @Elchi3) and just go ahead and provide up-and-down measures for everything but the ratios (i.e., you get I also commented the fields more, to provide some explanations. The hardest one is cumulative shipping days. The shortest summary I can think of is: it's a number that gets bigger for every day when we have unmapped keys, but it's exaggerated for keys that are implemented in multiple browsers. Here's my longer description of cumulative shipping days:
Here's a new example output:
|
|
Also, in writing the cumulative shipping days description, I did notice that I need to change it to not use a floating today value, but rather bind it to the BCD release "clock" (like we do for the Baseline low date calculations). I'll pick that up tomorrow. (Fix goes in this file, doing something like this line.) |
Elchi3
left a comment
There was a problem hiding this comment.
Thanks Daniel! Great work! This looks good to me!
(It is a bit slow on my machine, but unmapped-compat-keys just takes a while to compute, I assume).
Should it be available as "npm run stats"?
Thank you!
It is slow, partly because this ends up computing each feature's status twice. I'd like to find the time soon to do a light refactor to memoize some of compute-baseline and a cache the complete
Yes, that's a good idea. I'll add that and merge. |
Towards #3510, this PR updates
./scripts/stats.tsto return a JSON object with counts of:For sample output, see #4030 (comment).
(Yes, some of those numbers are very large! This is expected.)
If you rerun it with
--previous some-previous-run.json, it'll include achangekey with the difference between the two runs.Possible follow up work:
stats.jsonrelease artifact for comparing stats over time