Bug 169577 - Web Inspector: More accurate Resource Timing data in Web Inspector
Summary: Web Inspector: More accurate Resource Timing data in Web Inspector
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-13 17:12 PDT by Joseph Pecoraro
Modified: 2017-03-14 11:19 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (21.08 KB, patch)
2017-03-13 17:16 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-03-13 17:12:03 PDT
Summary:
More accurate Resource Timing data in Web Inspector

* The "responseEnd" time we show in Web Inspector comes from the Web Process instead of the responseEnd time we got from the Network Process which we use in ResourceTiming. Unify them.
* The millisecond values seems to be off in the ResourceResponse path.
Comment 1 Joseph Pecoraro 2017-03-13 17:16:23 PDT
Created attachment 304325 [details]
[PATCH] Proposed Fix
Comment 2 youenn fablet 2017-03-13 20:59:22 PDT
Comment on attachment 304325 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=304325&action=review

> Source/WebCore/loader/CrossOriginPreflightChecker.cpp:88
> +    InspectorInstrumentation::didFinishLoading(frame, frame->loader().documentLoader(), identifier, emptyMetrics, nullptr);

When preflight gets a response, we might be able to  get the resource loader from the cached resource.
Is there a way to get the metrics?
Comment 3 Joseph Pecoraro 2017-03-14 10:49:30 PDT
(In reply to comment #2)
> Comment on attachment 304325 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=304325&action=review
> 
> > Source/WebCore/loader/CrossOriginPreflightChecker.cpp:88
> > +    InspectorInstrumentation::didFinishLoading(frame, frame->loader().documentLoader(), identifier, emptyMetrics, nullptr);
> 
> When preflight gets a response, we might be able to  get the resource loader
> from the cached resource.
>
> Is there a way to get the metrics?

There should be metrics in the didFinishLoad that lead to CachedResources::notifyFinished. We just have to thread that plumbing. That said, Preflight already has a bunch of issues in Web Inspector that need to be sorted out (failures don't show up at all), so I'll leave this for that more serious task.
Comment 4 WebKit Commit Bot 2017-03-14 11:19:50 PDT
Comment on attachment 304325 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 304325

Committed r213917: <http://trac.webkit.org/changeset/213917>
Comment 5 WebKit Commit Bot 2017-03-14 11:19:55 PDT
All reviewed patches have been landed.  Closing bug.