Skip to content
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

multiple reports in same json file #132

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sagudev
Copy link
Collaborator

@sagudev sagudev commented Jul 30, 2024

Just to be sure, firefox's wptreport.json is also one line json file, right?

Copy link
Collaborator

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

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

Just some thoughts. Since this is a draft, just thought I'd leave what I had. 🙂

Comment on lines 402 to 403
// Servo has multiple reports in same json file (each in one line)
// First one is from first run, second one run that runs only unexpected results for filtering
Copy link
Collaborator

Choose a reason for hiding this comment

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

praise: I think it's great context to note motivation for doing this.

Copy link
Collaborator

@ErichDonGubler ErichDonGubler Jul 30, 2024

Choose a reason for hiding this comment

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

suggestion(non-blocking): Maybe it'd be interesting to re-phrase and say that Servo's wptreport.json files essentially a two-record JSONL file?

Copy link
Collaborator

@ErichDonGubler ErichDonGubler Jul 30, 2024

Choose a reason for hiding this comment

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

suggestion(if-minor): If this behavior is Servo-specific, I think it might be better to gate it behind a matches!(browser, Browser::Servo) check?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

suggestion(if-minor): If this behavior is Servo-specific, I think it might be better to gate it behind a matches!(browser, Browser::Servo) check?

It is, but it should be compatible with normal wptreports files (from firefox). Actually servo's wptreport.json can also contain only one object (one run, no unexpected results, or no filtering requested).

Copy link
Collaborator

@ErichDonGubler ErichDonGubler Jul 31, 2024

Choose a reason for hiding this comment

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

@sagudev: I understand that this is backwards-compatible with existing wptreport.json documents, and I agree that it is a nice property. However, I think that silent handling of this superset should still be opt-in on some basis. If there were multiple concatenated JSON values in a vanilla wptreport.json, that would more likely mean that something has gone wrong (though I suppose the structure of each value would be checked 🤔). I'd rather an error or warning be emitted by default, for now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It is, but it should be compatible with normal wptreports files (from firefox). Actually servo's wptreport.json can also contain only one object (one run, no unexpected results, or no filtering requested).

I guess I'm confused about this use case's justification, then. This feature seems like it'd only make sense if you could only provide a JSONL document to moz-webgpu-cts, but you're noting that Servo emits a single JSON object per document, too. Is there a reason that you want to feed concatenated JSON objects in a single file to moz-webgpu-cts, instead of providing it multiple file paths?

Copy link
Collaborator

Choose a reason for hiding this comment

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

RE: justification: I'm guessing that there's an intermediate step in Servo's process that divides a single report into two partitioned JSON objects?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

RE: justification: I'm guessing that there's an intermediate step in Servo's process that divides a single report into two partitioned JSON objects?

Yes, and given that in the future we can also use those results for intermittent, this additional step in servo would only make it harder.

CI runs do filtering, hence you get to objects in same JSON file, but local runs are usually done without filtering (less CLI flags needed) so it only creates one object in JSON file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've added warning if there are any leftover objects in JSON (if not servo) in 905b6b8

moz-webgpu-cts/src/main.rs Outdated Show resolved Hide resolved
@ErichDonGubler

This comment was marked as resolved.

@sagudev sagudev marked this pull request as ready for review July 31, 2024 11:54
@sagudev sagudev requested a review from ErichDonGubler July 31, 2024 11:54
@ErichDonGubler ErichDonGubler added the enhancement New feature or request label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants