• Sigurd Schneider's avatar
    [devtools] Emit timing event for queuing of a request from the browser · ddc4940f
    Sigurd Schneider authored
    The devtools network tab receives a notification via "requestWillBeSent"
    that corresponds to the time when the browser process queues a network
    request. This enables the network tab to calculate how long the task
    was queued.
    
    The timeline (performance) panel does not receive a corresponding
    tracing event, and hence does not know how long a task was queued. This
    results in different times being reported as totals in the network vs
    the performance panel if the task was initiated from the browser (and
    not from the renderer).
    
    This CL adds a tracing event to the browser that indicates that a
    network request will be queued, and processes the event in DevTools
    so that the network access time reported in the performance tab matches
    the time reported in the network tab for requests initiated in the
    browser.
    
    For requests initiated in the renderer, the ResourceSendRequest tracing
    event already has the time when the request gets queued (up to a few
    1/100 ms).
    
    Bug: chromium:865066
    Change-Id: I1edfac4ec7ada8407b5dd931920e26e139b4f8df
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1771398
    Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
    Reviewed-by: default avatarAlexei Filippov <alph@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#695614}
    ddc4940f
service_worker_devtools_manager.cc 8.59 KB