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

Make performance observers take "type" and "buffered" options without panicking. #25590

Merged
merged 2 commits into from Feb 12, 2020

Conversation

@pshaughn
Copy link
Member

pshaughn commented Jan 23, 2020

I updated the observe() method to align with spec, and fixed the borrow duration bug @jdm pointed out in #25589 so it wouldn't cause a hard crash. Some tests go from failing to passing, but others go from early failing to later timeout; performance observers still aren't doing the right thing in all cases.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #24781 and fix #25589 and fix #23225
  • There are tests for these changes
@highfive
Copy link

highfive commented Jan 23, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/webidls/PerformanceObserver.webidl, components/script/dom/performanceobserver.rs
  • @KiChjang: components/script/dom/webidls/PerformanceObserver.webidl, components/script/dom/performanceobserver.rs
@pshaughn
Copy link
Member Author

pshaughn commented Jan 23, 2020

If the timeouts in CI are the same as in my local environment, they'll need a followup issue.

@jdm
Copy link
Member

jdm commented Jan 24, 2020

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Jan 24, 2020

Trying commit 9872ad7 with merge ea5e82d...

bors-servo added a commit that referenced this pull request Jan 24, 2020
Make performance observers take "type" and "buffered" options without panicking.

<!-- Please describe your changes on the following line: -->
I updated the observe() method to align with spec, and fixed the borrow duration bug @jdm pointed out in #25589 so it wouldn't cause a hard crash. Some tests go from failing to passing, but others go from early failing to later timeout; performance observers still aren't doing the right thing in all cases.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24781 and fix #25589

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 24, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jan 24, 2020

10 unexpected results that are NOT known-intermittents:
  â–¶ Unexpected subtest result in /performance-timeline/po-observe-type.any.html:
  â”” PASS [expected FAIL] Calling observe() with entryTypes and then type should throw an InvalidModificationError

  â–¶ Unexpected subtest result in /performance-timeline/po-observe-type.any.html:
  â”” PASS [expected FAIL] Calling observe() with type and then entryTypes should throw an InvalidModificationError

  â–¶ Unexpected subtest result in /performance-timeline/po-observe-type.any.html:
  â”” PASS [expected FAIL] Calling observe() with type and entryTypes should throw a SyntaxError

  â–¶ Unexpected subtest result in /performance-timeline/po-observe-type.any.html:
  â”” PASS [expected FAIL] Passing in unknown values to type does throw an exception.

  â–¶ Unexpected subtest result in /performance-timeline/po-observe-type.any.html:
  │ TIMEOUT [expected FAIL] observe() with different type values stacks.
  └   → Test timed out


  â–¶ TIMEOUT [expected OK] /performance-timeline/multiple-buffered-flag-observers.any.worker.html
  │ 
  │ 
  │ 
  â”” 

  â–¶ Unexpected subtest result in /performance-timeline/multiple-buffered-flag-observers.any.worker.html:
  │ TIMEOUT [expected PASS] Multiple PerformanceObservers with buffered flag see all entries
  └   → Test timed out


  â–¶ Unexpected subtest result in /performance-timeline/buffered-flag-observer.any.worker.html:
  │ TIMEOUT [expected FAIL] PerformanceObserver with buffered flag should see past and future entries.
  └   → Test timed out


  â–¶ Unexpected subtest result in /performance-timeline/buffered-flag-observer.any.html:
  │ TIMEOUT [expected FAIL] PerformanceObserver with buffered flag should see past and future entries.
  └   → Test timed out


  â–¶ TIMEOUT [expected OK] /performance-timeline/multiple-buffered-flag-observers.any.html
  │ 
  │ 
  │ 
  â”” 

  â–¶ Unexpected subtest result in /performance-timeline/multiple-buffered-flag-observers.any.html:
  │ TIMEOUT [expected PASS] Multiple PerformanceObservers with buffered flag see all entries
  └   → Test timed out


  â–¶ Unexpected subtest result in /performance-timeline/buffered-flag-after-timeout.any.worker.html:
  │ TIMEOUT [expected FAIL] PerformanceObserver with buffered flag sees entry after timeout
  └   → Test timed out


  â–¶ TIMEOUT [expected OK] /performance-timeline/buffered-flag-after-timeout.any.html
  │ 
  │ 
  │ 
  â”” 

  â–¶ Unexpected subtest result in /performance-timeline/buffered-flag-after-timeout.any.html:
  │ TIMEOUT [expected PASS] PerformanceObserver with buffered flag sees entry after timeout
  └   → Test timed out


  â–¶ TIMEOUT [expected ERROR] /resource-timing/buffered-flag.any.worker.html
  │ 
  │ 
  │ 
  â”” 


  â–¶ Unexpected subtest result in /performance-timeline/po-observe-type.any.worker.html:
  â”” PASS [expected FAIL] Calling observe() with entryTypes and then type should throw an InvalidModificationError

  â–¶ Unexpected subtest result in /performance-timeline/po-observe-type.any.worker.html:
  â”” PASS [expected FAIL] Calling observe() with type and then entryTypes should throw an InvalidModificationError

  â–¶ Unexpected subtest result in /performance-timeline/po-observe-type.any.worker.html:
  â”” PASS [expected FAIL] Calling observe() with type and entryTypes should throw a SyntaxError

  â–¶ Unexpected subtest result in /performance-timeline/po-observe-type.any.worker.html:
  â”” PASS [expected FAIL] Passing in unknown values to type does throw an exception.

  â–¶ Unexpected subtest result in /performance-timeline/po-observe-type.any.worker.html:
  │ TIMEOUT [expected FAIL] observe() with different type values stacks.
  └   → Test timed out


  â–¶ OK [expected ERROR] /resource-timing/buffered-flag.any.html

  â–¶ Unexpected subtest result in /resource-timing/buffered-flag.any.html:
  │ FAIL [expected TIMEOUT] PerformanceObserver with buffered flag sees previous resource entries.
  │   → assert_equals: There should be 1 resource entry. expected 1 but got 2
  │ 
  │ @http://web-platform.test:8000/resource-timing/buffered-flag.any.js:9:7
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:2024:25
  â”” Test.prototype.step_func_done/<@http://web-platform.test:8000/resources/testharness.js:2065:32

@pshaughn
Copy link
Member Author

pshaughn commented Jan 24, 2020

I decided to do a slightly off-spec thing the tests were implying in order to avoid intermittency; I'm expecting this to have a consistent result now.
@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Jan 24, 2020

Trying commit 1243195 with merge 545f3a3...

bors-servo added a commit that referenced this pull request Jan 24, 2020
Make performance observers take "type" and "buffered" options without panicking.

<!-- Please describe your changes on the following line: -->
I updated the observe() method to align with spec, and fixed the borrow duration bug @jdm pointed out in #25589 so it wouldn't cause a hard crash. Some tests go from failing to passing, but others go from early failing to later timeout; performance observers still aren't doing the right thing in all cases.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24781 and fix #25589

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 24, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jan 24, 2020

  ▶ OK [expected ERROR] /resource-timing/buffered-flag.any.worker.html
  ▶ Unexpected subtest result in /resource-timing/buffered-flag.any.worker.html:
  │ FAIL [expected TIMEOUT] PerformanceObserver with buffered flag sees previous resource entries.
  │   → assert_true: expected true got false
  │ 
  │ @http://web-platform.test:8000/resource-timing/buffered-flag.any.js:14:7
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:2024:25
  └ Test.prototype.step_func_done/<@http://web-platform.test:8000/resources/testharness.js:2065:32
  ▶ OK [expected ERROR] /resource-timing/buffered-flag.any.html
  ▶ Unexpected subtest result in /resource-timing/buffered-flag.any.html:
  │ FAIL [expected TIMEOUT] PerformanceObserver with buffered flag sees previous resource entries.
  │   → assert_equals: There should be 1 resource entry. expected 1 but got 2
  │ 
  │ @http://web-platform.test:8000/resource-timing/buffered-flag.any.js:9:7
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:2024:25
  └ Test.prototype.step_func_done/<@http://web-platform.test:8000/resources/testharness.js:2065:32
@pshaughn
Copy link
Member Author

pshaughn commented Jan 25, 2020

Interesting! Now that we'rd not getting a timeout there, we see that the script is buffering a resource entry for its own url!


// https://w3c.github.io/performance-timeline/#takerecords-method
fn TakeRecords(&self) -> Vec<DomRoot<PerformanceEntry>> {
warn!("About to borrow_mut entries to copy and clear them in TakeRecords");

This comment has been minimized.

@pshaughn

pshaughn Jan 25, 2020

Author Member

This was left over from bug-hunting, I will remove it

@pshaughn pshaughn force-pushed the pshaughn:perfobs branch from b2f4555 to 6d15c06 Jan 27, 2020
@pshaughn
Copy link
Member Author

pshaughn commented Jan 27, 2020

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Jan 27, 2020

Trying commit 6d15c06 with merge 0ae0366...

bors-servo added a commit that referenced this pull request Jan 27, 2020
Make performance observers take "type" and "buffered" options without panicking.

<!-- Please describe your changes on the following line: -->
I updated the observe() method to align with spec, and fixed the borrow duration bug @jdm pointed out in #25589 so it wouldn't cause a hard crash. Some tests go from failing to passing, but others go from early failing to later timeout; performance observers still aren't doing the right thing in all cases.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24781 and fix #25589

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 27, 2020

💔 Test failed - status-taskcluster

@pshaughn
Copy link
Member Author

pshaughn commented Jan 27, 2020

@pshaughn
Copy link
Member Author

pshaughn commented Jan 29, 2020

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Jan 29, 2020

Trying commit 5c00acc with merge fb27c32...

bors-servo added a commit that referenced this pull request Jan 29, 2020
Make performance observers take "type" and "buffered" options without panicking.

<!-- Please describe your changes on the following line: -->
I updated the observe() method to align with spec, and fixed the borrow duration bug @jdm pointed out in #25589 so it wouldn't cause a hard crash. Some tests go from failing to passing, but others go from early failing to later timeout; performance observers still aren't doing the right thing in all cases.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24781 and fix #25589

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 29, 2020

💔 Test failed - status-taskcluster

@pshaughn
Copy link
Member Author

pshaughn commented Jan 29, 2020

good old #24726, I'm gonna miss that bug when it's gone

@jdm
Copy link
Member

jdm commented Feb 12, 2020

@bors-servo r+
Thanks for fixing this!

@bors-servo
Copy link
Contributor

bors-servo commented Feb 12, 2020

📌 Commit 5c00acc has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Feb 12, 2020

Testing commit 5c00acc with merge ed9b584...

bors-servo added a commit that referenced this pull request Feb 12, 2020
Make performance observers take "type" and "buffered" options without panicking.

<!-- Please describe your changes on the following line: -->
I updated the observe() method to align with spec, and fixed the borrow duration bug @jdm pointed out in #25589 so it wouldn't cause a hard crash. Some tests go from failing to passing, but others go from early failing to later timeout; performance observers still aren't doing the right thing in all cases.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24781 and fix #25589 and fix #23225

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 12, 2020

☀️ Test successful - status-taskcluster
Approved by: jdm
Pushing ed9b584 to master...

@bors-servo bors-servo merged commit 5c00acc into servo:master Feb 12, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@bors-servo bors-servo mentioned this pull request Feb 12, 2020
4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.