Bug 41824 - Wire network times from ResourceLoadTiming to performance.timing
Summary: Wire network times from ResourceLoadTiming to performance.timing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Tony Gentilcore
URL:
Keywords:
Depends on: 41332 42091
Blocks: 30685
  Show dependency treegraph
 
Reported: 2010-07-07 18:12 PDT by Tony Gentilcore
Modified: 2010-07-14 13:30 PDT (History)
3 users (show)

See Also:


Attachments
Patch (14.54 KB, patch)
2010-07-12 21:35 PDT, Tony Gentilcore
fishd: review+
fishd: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Gentilcore 2010-07-07 18:12:41 PDT
Wire network times from ResourceLoadTiming to performance.timing for Web Timing feature
Comment 1 Tony Gentilcore 2010-07-12 21:35:27 PDT
Created attachment 61320 [details]
Patch
Comment 2 Darin Fisher (:fishd, Google) 2010-07-12 22:05:22 PDT
Comment on attachment 61320 [details]
Patch

WebCore/page/Timing.cpp:84
 +      return static_cast<unsigned long long>(domainLookupStart * 1000);
nit: use 1000.0 to improve readability (same nit applies elsewhere).  a
static helper function might also be nice: toIntegerMilliseconds(double)?

R=me
Comment 3 Tony Gentilcore 2010-07-13 16:29:40 PDT
(In reply to comment #2)
> (From update of attachment 61320 [details])
> WebCore/page/Timing.cpp:84
>  +      return static_cast<unsigned long long>(domainLookupStart * 1000);
> nit: use 1000.0 to improve readability (same nit applies elsewhere).  a
> static helper function might also be nice: toIntegerMilliseconds(double)?

Wow, that is so much cleaner. Thanks.

> 
> R=me

Landed r63259
Comment 4 Darin Fisher (:fishd, Google) 2010-07-13 23:00:08 PDT
Note: toIntegerMilliseconds probably would have been better as a file static instead of a class static.  that way it will have internal linkage and be optimized away to nothing (although that might still happen in this case).  class statics have external linkage by default.
Comment 5 Tony Gentilcore 2010-07-14 13:30:23 PDT
(In reply to comment #4)
> Note: toIntegerMilliseconds probably would have been better as a file static instead of a class static.  that way it will have internal linkage and be optimized away to nothing (although that might still happen in this case).  class statics have external linkage by default.

Great education for me. I assumed they would compile to the same thing.

I'll post a follow-up patch.