Use object rather than array for scores.json entries#67
Merged
Conversation
This was referenced Jul 17, 2025
Signed-off-by: Nico Burns <nico@nicoburns.com>
bec1da8 to
9036ad8
Compare
mukilan
approved these changes
Jul 18, 2025
Member
mukilan
left a comment
There was a problem hiding this comment.
I'm curious to know what is the new size of the scores.json. Hopefully, the gzip compression on server side still helps.
Contributor
Author
The new file is 2147kb compared to 2107kb for the old file. GZIP compression is reducing the old files to 76.7kb, and I'd expect the new changes to also compress well as they're adding a single repeated string. |
Contributor
Author
|
New gzipped size is 77.3kb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes the
scores.jsonformat in preparation for #50 (rewrite score calculation in Rust). The main change is to replace the use of a heterogeneous array (mix of strings and objects) with a keyed object and a nested array. The new format is easier to serialize/deserialize usingserde(and IMO makes more sense in JS anyway).Corresponding servo.org PR (should be merged at same time): servo/servo.org#241
before:
[ "2025-07-17", "1c4797809", "0.0.1-f70a4eb4f", { "total_tests": 46787, "total_score": 29447.8764608724, "total_subtests": 1854463, "total_subtests_passed": 1722785 }, { "total_tests": 809, "total_score": 502.872027417027, "total_subtests": 3659, "total_subtests_passed": 2186 }, ... ]After:
{ "date": "2025-07-17", "wpt_revision": "1c4797809", "servo_revision": "0.0.1-f70a4eb4f", "scores": [ { "total_tests": 46787, "total_score": 29447.876460872423, "total_subtests": 1854463, "total_subtests_passed": 1722785 }, { "total_tests": 809, "total_score": 502.8720274170274, "total_subtests": 3659, "total_subtests_passed": 2186 }, ... ] }