Skip to content

Add information about number of tests and subtests #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged

Conversation

mrego
Copy link
Member

@mrego mrego commented Apr 2, 2025

Add information about number of tests and subtests

This modifies the scores.json file so it now provides more data:

  • total_tests: The total number of tests
  • total_score: The total scores for the tests
  • total_subtests: The total number of subtests
  • total_subtests_passed: The number of subtests that pass

This is based on previous work by Delan Azabani at #35.

This also creates a new output file scores-last-run.json
with only the data of the last run.

@mrego mrego requested a review from mukilan April 2, 2025 16:06
mrego added a commit to servo/servo.org that referenced this pull request Apr 2, 2025
@mrego
Copy link
Member Author

mrego commented Apr 2, 2025

If this is merged we'll have to also land a change on the website so the new information is used there: servo/servo.org#233

Copy link
Contributor

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment:

  • We could probably leave out the per_mille_* fields here and compute them on the frontend if we wanted to. It's probably also fine to have them here. My concern is around keeping the filesize small.

A question:

  • Is this format backwards compatible with the existing file? If not then we'll need to carefully time merging this with the website PR. (but it looks like it probably is?)

Copy link
Contributor

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of points of note in comments, but this generally looks good and I don't think either are blocking.

Copy link
Member

@mukilan mukilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I have a left comments about logic used for calculation of subtests for historic runs. In addition, I think there are few syntax issues that our linter will complain about. Could you please run npm run lint locally and address those issues?

@mrego
Copy link
Member Author

mrego commented Apr 3, 2025

A comment:

  • We could probably leave out the per_mille_* fields here and compute them on the frontend if we wanted to. It's probably also fine to have them here. My concern is around keeping the filesize small.

Yeah, I can do this so the size would be reduced a little bit.

A question:

  • Is this format backwards compatible with the existing file? If not then we'll need to carefully time merging this with the website PR. (but it looks like it probably is?)

No, it's not backwards compatible, when we land this we should also land #51

@mrego
Copy link
Member Author

mrego commented Apr 3, 2025

I have uploaded a new version fixing lint and adding a new test for the old vs new runs count, but I need to understand what we want to do there as I'm not sure about the numbers we have now.

I haven't yet modified the .json file to remove the per_mille fields.

@mrego mrego force-pushed the wpt-subtests branch 2 times, most recently from 9d04a87 to 4d7d22e Compare April 3, 2025 06:39
@mrego
Copy link
Member Author

mrego commented Apr 3, 2025

I think the last version covers most of the comments, PTAL. Thanks.

Before landing I need to update the website PR, but first I want to get agreement on this one in particular.

Copy link
Member

@mukilan mukilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me with the latest changes! Thanks!

This modifies the scores.json file so it now provides more data:
* total_tests: The total number of tests
* total_score: The total scores for the tests
* total_subtests: The total number of subtests
* total_subtests_passed: The number of subtests that pass

This is based on previous work by Delan Azabani at #35.

This also creates a new output file scores-last-run.json
with only the data of the last run.

Co-authored-by: Delan Azabani <[email protected]>
Signed-off-by: Manuel Rego Casasnovas <[email protected]>
mrego added a commit to servo/servo.org that referenced this pull request Apr 3, 2025
mrego added a commit to servo/servo.org that referenced this pull request Apr 3, 2025
mrego added a commit to servo/servo.org that referenced this pull request Apr 3, 2025
This is a companion of servo/internal-wpt-dashboard#56

Co-authored-by: Mukilan Thiyagarajan <[email protected]>
Signed-off-by: Manuel Rego Casasnovas <[email protected]>
mrego added a commit to servo/servo.org that referenced this pull request Apr 3, 2025
This is a companion of servo/internal-wpt-dashboard#56

Co-authored-by: Mukilan Thiyagarajan <[email protected]>
Signed-off-by: Manuel Rego Casasnovas <[email protected]>
@mrego mrego merged commit f342688 into main Apr 3, 2025
@mrego mrego deleted the wpt-subtests branch April 3, 2025 10:57
mrego added a commit to servo/servo.org that referenced this pull request Apr 3, 2025
This is a companion of servo/internal-wpt-dashboard#56

Co-authored-by: Mukilan Thiyagarajan <[email protected]>
Signed-off-by: Manuel Rego Casasnovas <[email protected]>
@mrego
Copy link
Member Author

mrego commented Apr 3, 2025

Just for the record, the size of the generated files:

  • scores.json 1.6M (56K gzipped)
  • scores-last-run.json 3.3K (<1K gzipped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants