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 the net monitor panel in FF's devtools show meaningful output. #11593

Merged
merged 1 commit into from Jun 6, 2016

Conversation

@jdm
Copy link
Member

jdm commented Jun 3, 2016

  1. Advertise support for the network monitor in the initial protocol communication.
  2. Only notify the developer tools server about the final request in an HTTP transaction.
  3. Add timing information for connecting to the HTTP server and sending the HTTP request.
  4. Reduce duplication between various networkEventUpdate structures by creating a helper function
    that merges two JSON structures together. This also corrects the JSON structure so the devtools
    client interprets the output correctly.
  5. Calculate various header size fields correctly.
  6. Remove unnecessary usize->u32 casts by making the appropriate fields usize.
  7. Add header values to request and response header messages.
  8. Support triggering page reloads via the devtools client.

I apologize that these aren't broken apart. I was making a lot of changes trying to figure out why the panel wasn't working right, and a lot of them were tangled together.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because there are no automated tests for the devtools server.

This change is Reviewable

@highfive
Copy link

highfive commented Jun 3, 2016

Heads up! This PR modifies the following files:

  • @fitzgen: components/devtools/actors/root.rs, components/devtools_traits/lib.rs, components/devtools_traits/lib.rs, components/devtools/actors/network_event.rs, components/devtools/protocol.rs, components/devtools/lib.rs, components/devtools/actors/tab.rs
  • @KiChjang: components/net/fetch/methods.rs, components/net/http_loader.rs, components/script/script_thread.rs, components/script/devtools.rs
@highfive
Copy link

highfive commented Jun 3, 2016

warning Warning warning

  • These commits modify net and script code, but no tests are modified. Please consider adding a test!
@jdm jdm assigned nox and unassigned pcwalton Jun 3, 2016
@jdm
Copy link
Member Author

jdm commented Jun 3, 2016

cc @dd0x68
There's still lots to do to make the network panel useful (including verifying that it's actually reporting valid data for the cases in which Servo is attempting to provide it), but this gives us a place to start.

@metajack
Copy link
Contributor

metajack commented Jun 4, 2016

Wow!

@nox
Copy link
Member

nox commented Jun 4, 2016

Do you think you could split it in commits that follow the steps you describe in the PR description?

@nox
Copy link
Member

nox commented Jun 4, 2016

Oh never mind, didn't notice your note at the end of the PR description.

@nox
Copy link
Member

nox commented Jun 5, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 5, 2016

📌 Commit caa102f has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Jun 5, 2016

Testing commit caa102f with merge de2ea38...

bors-servo added a commit that referenced this pull request Jun 5, 2016
Make the net monitor panel in FF's devtools show meaningful output.

<!-- Please describe your changes on the following line: -->
1. Advertise support for the network monitor in the initial protocol communication.
1. Only notify the developer tools server about the final request in an HTTP transaction.
1. Add timing information for connecting to the HTTP server and sending the HTTP request.
1. Reduce duplication between various networkEventUpdate structures by creating a helper function
that merges two JSON structures together. This also corrects the JSON structure so the devtools
client interprets the output correctly.
1. Calculate various header size fields correctly.
1. Remove unnecessary usize->u32 casts by making the appropriate fields usize.
1. Add header values to request and response header messages.
1. Support triggering page reloads via the devtools client.

I apologize that these aren't broken apart. I was making a lot of changes trying to figure out why the panel wasn't working right, and a lot of them were tangled together.

---
<!-- 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 do not require tests because there are no automated tests for the devtools server.

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11593)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 5, 2016

💔 Test failed - linux-dev

@nox
Copy link
Member

nox commented Jun 5, 2016

/home/servo/buildbot/slave/linux-dev/build/tests/unit/net/http_loader.rs:500:23: 500:42 error: missing fields `connect_time`, `send_time`, `timeStamp` in initializer of `devtools_traits::HttpRequest` [E0063]
/home/servo/buildbot/slave/linux-dev/build/tests/unit/net/http_loader.rs:500     let httprequest = DevtoolsHttpRequest {
                                                                                                   ^~~~~~~~~~~~~~~~~~~
/home/servo/buildbot/slave/linux-dev/build/tests/unit/net/http_loader.rs:500:23: 500:42 help: run `rustc --explain E0063` to see a detailed explanation
error: aborting due to previous error

The unit tests need to be updated.

0) Advertise support for the network monitor in the initial protocol communication.
1) Only notify the developer tools server about the final request in an HTTP transaction.
2) Add timing information for connecting to the HTTP server and sending the HTTP request.
3) Reduce duplication between various networkEventUpdate structures by creating a helper function
that merges two JSON structures together. This also corrects the JSON structure so the devtools
client interprets the output correctly.
4) Calculate various header size fields correctly.
5) Remove unnecessary usize->u32 casts by making the appropriate fields usize.
6) Add header values to request and response header messages.
7) Support triggering page reloads via the devtools client.
@jdm jdm force-pushed the jdm:netmon branch from caa102f to 7bf2e19 Jun 5, 2016
@highfive
Copy link

highfive commented Jun 5, 2016

New code was committed to pull request.

@jdm
Copy link
Member Author

jdm commented Jun 5, 2016

@bors-servo: r=nox

@bors-servo
Copy link
Contributor

bors-servo commented Jun 5, 2016

📌 Commit 7bf2e19 has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Jun 5, 2016

Testing commit 7bf2e19 with merge 825b5b6...

bors-servo added a commit that referenced this pull request Jun 5, 2016
Make the net monitor panel in FF's devtools show meaningful output.

<!-- Please describe your changes on the following line: -->
1. Advertise support for the network monitor in the initial protocol communication.
1. Only notify the developer tools server about the final request in an HTTP transaction.
1. Add timing information for connecting to the HTTP server and sending the HTTP request.
1. Reduce duplication between various networkEventUpdate structures by creating a helper function
that merges two JSON structures together. This also corrects the JSON structure so the devtools
client interprets the output correctly.
1. Calculate various header size fields correctly.
1. Remove unnecessary usize->u32 casts by making the appropriate fields usize.
1. Add header values to request and response header messages.
1. Support triggering page reloads via the devtools client.

I apologize that these aren't broken apart. I was making a lot of changes trying to figure out why the panel wasn't working right, and a lot of them were tangled together.

---
<!-- 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 do not require tests because there are no automated tests for the devtools server.

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11593)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 6, 2016

💔 Test failed - linux-rel

@highfive
Copy link

highfive commented Jun 6, 2016

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/transform-abspos-002.htm
  └   → /css-transforms-1_dev/html/transform-abspos-002.htm 71f0313eedfbfcce0b0fcc5ae55f34b1daa3b8d8
/css-transforms-1_dev/html/reference/transform-abspos-ref.htm 78d197606924062e8dd2a773c977afcecf8940f8
Testing 71f0313eedfbfcce0b0fcc5ae55f34b1daa3b8d8 == 78d197606924062e8dd2a773c977afcecf8940f8
@nox
Copy link
Member

nox commented Jun 6, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 6, 2016

Previous build results for android, arm32, arm64, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows are reusable. Rebuilding only linux-rel...

@bors-servo
Copy link
Contributor

bors-servo commented Jun 6, 2016

💔 Test failed - linux-rel

@highfive
Copy link

highfive commented Jun 6, 2016

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/transform3d-translatez-001.htm
  └   → /css-transforms-1_dev/html/transform3d-translatez-001.htm 902d90a8d198625335e738587fdfe81dcc90392d
/css-transforms-1_dev/html/reference/transform3d-translatez-ref.htm b14318ccfd8a59b7b249d41521e178d617678823
Testing 902d90a8d198625335e738587fdfe81dcc90392d == b14318ccfd8a59b7b249d41521e178d617678823
/css-transforms-1_dev/html/transform3d-translatez-001.htm 902d90a8d198625335e738587fdfe81dcc90392d
/css-transforms-1_dev/html/reference/transform3d-translatez-notref.htm 902d90a8d198625335e738587fdfe81dcc90392d
Testing 902d90a8d198625335e738587fdfe81dcc90392d != 902d90a8d198625335e738587fdfe81dcc90392d
@jdm
Copy link
Member Author

jdm commented Jun 6, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 6, 2016

Testing commit 7bf2e19 with merge 1bc94c1...

bors-servo added a commit that referenced this pull request Jun 6, 2016
Make the net monitor panel in FF's devtools show meaningful output.

<!-- Please describe your changes on the following line: -->
1. Advertise support for the network monitor in the initial protocol communication.
1. Only notify the developer tools server about the final request in an HTTP transaction.
1. Add timing information for connecting to the HTTP server and sending the HTTP request.
1. Reduce duplication between various networkEventUpdate structures by creating a helper function
that merges two JSON structures together. This also corrects the JSON structure so the devtools
client interprets the output correctly.
1. Calculate various header size fields correctly.
1. Remove unnecessary usize->u32 casts by making the appropriate fields usize.
1. Add header values to request and response header messages.
1. Support triggering page reloads via the devtools client.

I apologize that these aren't broken apart. I was making a lot of changes trying to figure out why the panel wasn't working right, and a lot of them were tangled together.

---
<!-- 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 do not require tests because there are no automated tests for the devtools server.

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11593)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 6, 2016

@bors-servo bors-servo merged commit 7bf2e19 into servo:master Jun 6, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.