Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPerformanceResourceTiming: duration #21255
Comments
|
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the If you intend to work on this issue, then add |
|
@highfive assign me :) |
|
Hey @haedaal! Thanks for your interest in working on this issue. It's now assigned to you! |
|
@haedaal Are you still working on this? Do you have any questions? |
|
@highfive assign me |
|
Hey @vn-ki! Thanks for your interest in working on this issue. It's now assigned to you! |
|
@jdm Can you please give some pointers where to start? I looked into |
|
I believe that this does not require any changes to the code in components/net; it only requires computing the difference between the responseEnd and fetchStart values in components/script/dom/performanceresourcetiming.rs and adding the interface attribute in components/script/dom/webidls/PerformanceResourceTiming.webidl. However, we do not implement responseEnd yet, so you should probably fix #21263 first. |
I can't find a file named that. |
|
@highfive assign me |
|
Hey @nagashayan! Thanks for your interest in working on this issue. It's now assigned to you! |
|
I see responseEnd and fetchStart is fixed now. this should be good to go now. |
|
Great! |
|
The duration attribute MUST return a DOMHighResTimeStamp equal to the difference between responseEnd and startTime, respectively. |
|
startTime issue #21254 should be completed before we can work on duration. I see the PR is here davidweitzenfeld#1 but its for forked branch. @jdm right? |
|
Indeed. If you want to cherry-pick that commit and build on top of it, that would be fine. |
|
right! I will do that. thanks. |
|
I started by cherry-picking on #21254 PR (in another forked repo), it seems that PR itself is not complete. starttime is not implemented in performanceresourcetiming.rs file. |
|
@nagashayan Are you still working on this? |
|
@jdm yes, this weekend I will try to finish. |
|
@jdm Just refreshed my memory I am waiting on 21254 issue to be resolved. I need that value to complete this PR. what do you think? |
|
Unassigning due to lack of activity. |
|
@jdm i cherry-picked the commits from David as mentioned a couple messages above and everything builds nice no tests i don't know where to put them besides w3c_navigation_timing.js and there its completely empty at the moment plus the documentation for how to run it seems to be missing? if PR #24493 looks good to you please assign me, if assigned please advise whether adding a setter function in PerformanceEntry that's called from PerformanceResourceTiming to set duration is the way to go-- also webidls look up-to-date and about the tests |
…<try> implement PerformanceResourceTiming duration <!-- Please describe your changes on the following line: --> Implements #21255 I wanted to give this a shot, but I'm not sure this is the appropriate implementation. In particular, I'm not sure if adding duration to the webidl interface is correct, because that doesn't seem to align with the web version (linked above the interface)? Also, I'd like to write a test for this method, but I'm not sure where that test should go. My apologies if this is way off target. --- <!-- 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 #21255 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
In components/net/http_loader.rs::http_fetch we need to set duration for the PerformanceEntry member of PerformanceResourceTiming. This will be the difference between response_end and start_time
Spec: https://w3c.github.io/resource-timing/#dfn-duration