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 upadded time to interactive metrics #18670
Conversation
highfive
commented
Sep 29, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Sep 29, 2017
|
|
|
It looks like there are a bunch of unrelated changes in Cargo.lock. Did you run a |
9091b05
to
92ddc3a
|
@jdm no clue what I did to Cargo.lock -- I'll fix that |
a38c9f7
to
62c6fe8
|
./mach test-unit is failing:
|
62c6fe8
to
dbb5755
|
Good start, but there are some fundamental issues with the logic for tracking TTI that we need to address. |
| # debug = true | ||
| # lto = false | ||
| debug = true | ||
| lto = false |
This comment has been minimized.
This comment has been minimized.
| @@ -757,7 +757,7 @@ impl LayoutThread { | |||
| return false | |||
| }, | |||
| Msg::SetNavigationStart(time) => { | |||
| self.paint_time_metrics.set_navigation_start(time); | |||
| (&self.paint_time_metrics).set_navigation_start(time); | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
avadacatavra
Oct 9, 2017
Author
Contributor
I made a trait ProgressiveWebMetric with function set_navigation_start, then ended up implementing it on &PaintTimeMetrics. I think I need to change the implementation to impl on PaintTimeMetrics and then make it so that you can call it on a ref
| @@ -28,6 +29,12 @@ impl ProfilerChan { | |||
| } | |||
| } | |||
|
|
|||
| impl HeapSizeOf for ProfilerChan { | |||
This comment has been minimized.
This comment has been minimized.
jdm
Oct 9, 2017
Member
Rather than doing this implementation and adding the heapsize dependency, we can use #[ignore_heap_size_of = "can't measure channels"] at the use site instead.
| } | ||
|
|
||
| unsafe_no_jsmanaged_fields!(InteractiveMetrics); |
This comment has been minimized.
This comment has been minimized.
| // debug!("Adding named element to document {:p}: {:p} id={}", | ||
| // self, | ||
| // element, | ||
| // id); |
This comment has been minimized.
This comment has been minimized.
| ReportCSSError(id, ..) => Some(id), | ||
| Reload(id, ..) => Some(id), | ||
| WebVREvents(id, ..) => Some(id), | ||
| _ => None, |
This comment has been minimized.
This comment has been minimized.
| fn is_cancelled(&self) -> bool { false } | ||
| fn name(&self) -> &'static str { "generic runnable" } | ||
| fn handler(self: Box<Self>) {} | ||
| fn pipeline(&self) -> Option<PipelineId> { None } |
This comment has been minimized.
This comment has been minimized.
jdm
Oct 9, 2017
Member
I think we probably want to migrate the pipeline method to the script::task::TaskOnce trait.
| @@ -673,6 +825,7 @@ impl ScriptThread { | |||
| }); | |||
| } | |||
|
|
|||
| //FIXME pipeline id | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| @@ -909,6 +1065,8 @@ impl ScriptThread { | |||
| self.handle_event(id, ResizeEvent(size, size_type)); | |||
| } | |||
|
|
|||
| // TODO avada can we replace sequential with task times | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| pub struct InteractiveWindow { | ||
| start: u64, | ||
| instant: Instant, | ||
| all_interactive: bool, |
This comment has been minimized.
This comment has been minimized.
jdm
Oct 9, 2017
Member
If we load document A, and then after N seconds (but before we would have recorded a TTI metric for it) it adds iframe B, we will now be measuring the TTI for both documents from the start of the window for B, right? We need to have separate window measurements for each document to avoid this, as far as I can tell.
| @@ -96,7 +93,7 @@ pub fn set_metric<U: ProgressiveWebMetric>( | |||
| } | |||
|
|
|||
| // https://github.com/GoogleChrome/lighthouse/issues/27 | |||
| #[derive(HeapSizeOf)] | |||
| #[ignore_heap_size_of = "can't measure channels"] | |||
This comment has been minimized.
This comment has been minimized.
jdm
Oct 16, 2017
Member
This doesn't work. We should leave the derive, but add #[ignore_heap_size_of = "can't measure channels"] on the time_profiler_chan member instead.
| CallValueTracer( | ||
| tracer, | ||
| val.ptr.get() as *mut _, | ||
| GCTraceKindToAscii(val.get().trace_kind()), |
This comment has been minimized.
This comment has been minimized.
|
@bors-servo retry |
|
@bors-servo: r+ |
|
|
added time to interactive metrics <!-- Please describe your changes on the following line: --> Added time to interactive metrics and refactored metrics/lib I need to write tests, but wanted to submit the PR for review --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18670) <!-- Reviewable:end -->
|
|
|
We have issues where we are trying to root a Trusted object off the the thread that it belongs to (presumably to acquire a pipeline id from its global).
|
| @@ -358,6 +359,7 @@ impl DedicatedWorkerGlobalScope { | |||
| #[allow(unsafe_code)] | |||
| pub fn forward_error_to_worker_object(&self, error_info: ErrorInfo) { | |||
| let worker = self.worker.borrow().as_ref().unwrap().clone(); | |||
| let pipeline_id = worker.clone().root().global().pipeline_id(); | |||
This comment has been minimized.
This comment has been minimized.
jdm
Oct 25, 2017
Member
Instead we can use self.upcast::<GlobalScope>().pipeline_id() and that will avoid the panic.
changed task sources to accept pipeline ids
6b70ef7
to
52b63de
|
@bors-servo: r+ |
|
|
added time to interactive metrics <!-- Please describe your changes on the following line: --> Added time to interactive metrics and refactored metrics/lib I need to write tests, but wanted to submit the PR for review --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18670) <!-- Reviewable:end -->
|
|
added navigation start for interactive metrics <!-- Please describe your changes on the following line: --> follow up from #18670, fixing #19099 --- <!-- 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 #19099 (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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19218) <!-- Reviewable:end -->
avadacatavra commentedSep 29, 2017
•
edited by SimonSapin
Added time to interactive metrics and refactored metrics/lib
I need to write tests, but wanted to submit the PR for review
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is