As discussed, I've added queue_time to TaskTimeObserver::DidProcessTask and removed base::TaskObserver from the LoAF monitor, so the worker congestion monitor uses a single task observer to get the queue time. PTAL.
// base::TaskObserver. Captures each task's scheduled start time (queue_time /Scott HaseleyMaybe we can add queue_time to TaskTimeObserver instead? WDYT @shas...@chromium.org
Joone HurSounds reasonable to me. I guess the caveat is it's not always set, but probably fine to document given GetDesiredExecutionTime() has the same behavior.
It would be good to use one or the other rather than a different type of observer for main vs. worker, if possible. IIRC the main difference is TaskTimeObserver ignores tasks that run in nested run loops, which should only affect the main thread (% devtools pausing, I think).
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
LG % a few comments. I'll wait for Noam to take another pass, but the guts of it LG.
TimeTicks queue_time) = 0;Can we rename this:
```suggestion
TimeTicks desired_execution_time) = 0;
```
given it maps to `GetDesiredExecutionTime()`?
FinalizeCongestedMoment();Will this entry be consumed by anything? I think the worker will stop running tasks after this?
// A congested moment is an interval during which the task queue staysnit: there are multiple task queues with different priorities, so "the task queue" is a bit of a simplification. It's probably worth rephrasing (here and below), and I think it's find, but please double-check that this matches the model you're using here (i.e. `desired_execution_time` of `task_N+1` can be less than `desired_execution_time` of `task_N`).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Really nice work.
I would want to see how the processing model looks like in the spec, but iterating on top of this prototype seems good.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |