Title: [185434] trunk/Source/WebCore
Revision
185434
Author
commit-qu...@webkit.org
Date
2015-06-10 15:53:42 -0700 (Wed, 10 Jun 2015)

Log Message

[Web Timing] Fix flaky test.
https://bugs.webkit.org/show_bug.cgi?id=145846

Patch by Alex Christensen <achristen...@webkit.org> on 2015-06-10
Reviewed by Alexey Proskuryakov.

The timing data is gathered in ResourceHandle::getConnectionTimingData as
millisecond deltas from the fetch start time, not the navigation start time.
The difference between navigation and fetch start time is usually so small that
it only caused one flaky test, but this should fix that flakiness. This patch
corrects how the millisecond deltas are used.

* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::domainLookupStart):
(WebCore::PerformanceTiming::domainLookupEnd):
(WebCore::PerformanceTiming::connectStart):
(WebCore::PerformanceTiming::connectEnd):
(WebCore::PerformanceTiming::secureConnectionStart):
(WebCore::PerformanceTiming::requestStart):
(WebCore::PerformanceTiming::responseStart):
(WebCore::PerformanceTiming::responseEnd):
(WebCore::PerformanceTiming::documentLoadTiming):
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart):
(WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Deleted.
* page/PerformanceTiming.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (185433 => 185434)


--- trunk/Source/WebCore/ChangeLog	2015-06-10 22:44:12 UTC (rev 185433)
+++ trunk/Source/WebCore/ChangeLog	2015-06-10 22:53:42 UTC (rev 185434)
@@ -1,3 +1,31 @@
+2015-06-10  Alex Christensen  <achristen...@webkit.org>
+
+        [Web Timing] Fix flaky test.
+        https://bugs.webkit.org/show_bug.cgi?id=145846
+
+        Reviewed by Alexey Proskuryakov.
+
+        The timing data is gathered in ResourceHandle::getConnectionTimingData as 
+        millisecond deltas from the fetch start time, not the navigation start time.
+        The difference between navigation and fetch start time is usually so small that 
+        it only caused one flaky test, but this should fix that flakiness. This patch 
+        corrects how the millisecond deltas are used.
+
+        * page/PerformanceTiming.cpp:
+        (WebCore::PerformanceTiming::domainLookupStart):
+        (WebCore::PerformanceTiming::domainLookupEnd):
+        (WebCore::PerformanceTiming::connectStart):
+        (WebCore::PerformanceTiming::connectEnd):
+        (WebCore::PerformanceTiming::secureConnectionStart):
+        (WebCore::PerformanceTiming::requestStart):
+        (WebCore::PerformanceTiming::responseStart):
+        (WebCore::PerformanceTiming::responseEnd):
+        (WebCore::PerformanceTiming::documentLoadTiming):
+        (WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart):
+        (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):
+        (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Deleted.
+        * page/PerformanceTiming.h:
+
 2015-06-10  Beth Dakin  <bda...@apple.com>
 
         Overriding the overlay scrollbar style on WKView doesn't take effect immediately

Modified: trunk/Source/WebCore/page/PerformanceTiming.cpp (185433 => 185434)


--- trunk/Source/WebCore/page/PerformanceTiming.cpp	2015-06-10 22:44:12 UTC (rev 185433)
+++ trunk/Source/WebCore/page/PerformanceTiming.cpp	2015-06-10 22:53:42 UTC (rev 185434)
@@ -135,7 +135,7 @@
     if (timing.domainLookupStart < 0)
         return fetchStart();
 
-    return resourceLoadTimeRelativeToAbsolute(timing.domainLookupStart);
+    return resourceLoadTimeRelativeToFetchStart(timing.domainLookupStart);
 }
 
 unsigned long long PerformanceTiming::domainLookupEnd() const
@@ -151,7 +151,7 @@
     if (timing.domainLookupEnd < 0)
         return domainLookupStart();
 
-    return resourceLoadTimeRelativeToAbsolute(timing.domainLookupEnd);
+    return resourceLoadTimeRelativeToFetchStart(timing.domainLookupEnd);
 }
 
 unsigned long long PerformanceTiming::connectStart() const
@@ -173,7 +173,7 @@
     if (timing.domainLookupEnd >= 0 && timing.domainLookupEnd > connectStart)
         connectStart = timing.domainLookupEnd;
 
-    return resourceLoadTimeRelativeToAbsolute(connectStart);
+    return resourceLoadTimeRelativeToFetchStart(connectStart);
 }
 
 unsigned long long PerformanceTiming::connectEnd() const
@@ -189,7 +189,7 @@
     if (timing.connectEnd < 0)
         return connectStart();
 
-    return resourceLoadTimeRelativeToAbsolute(timing.connectEnd);
+    return resourceLoadTimeRelativeToFetchStart(timing.connectEnd);
 }
 
 unsigned long long PerformanceTiming::secureConnectionStart() const
@@ -203,7 +203,7 @@
     if (timing.secureConnectionStart < 0)
         return 0;
 
-    return resourceLoadTimeRelativeToAbsolute(timing.secureConnectionStart);
+    return resourceLoadTimeRelativeToFetchStart(timing.secureConnectionStart);
 }
 
 unsigned long long PerformanceTiming::requestStart() const
@@ -215,7 +215,7 @@
     const ResourceLoadTiming& timing = loader->response().resourceLoadTiming();
     
     ASSERT(timing.requestStart >= 0);
-    return resourceLoadTimeRelativeToAbsolute(timing.requestStart);
+    return resourceLoadTimeRelativeToFetchStart(timing.requestStart);
 }
 
 unsigned long long PerformanceTiming::responseStart() const
@@ -227,7 +227,7 @@
     const ResourceLoadTiming& timing = loader->response().resourceLoadTiming();
     
     ASSERT(timing.responseStart >= 0);
-    return resourceLoadTimeRelativeToAbsolute(timing.responseStart);
+    return resourceLoadTimeRelativeToFetchStart(timing.responseStart);
 }
 
 unsigned long long PerformanceTiming::responseEnd() const
@@ -331,10 +331,10 @@
     return &loader->timing();
 }
 
-unsigned long long PerformanceTiming::resourceLoadTimeRelativeToAbsolute(int relativeMilliseconds) const
+unsigned long long PerformanceTiming::resourceLoadTimeRelativeToFetchStart(int relativeMilliseconds) const
 {
     ASSERT(relativeMilliseconds >= 0);
-    return navigationStart() + relativeMilliseconds;
+    return fetchStart() + relativeMilliseconds;
 }
 
 unsigned long long PerformanceTiming::monotonicTimeToIntegerMilliseconds(double monotonicSeconds) const

Modified: trunk/Source/WebCore/page/PerformanceTiming.h (185433 => 185434)


--- trunk/Source/WebCore/page/PerformanceTiming.h	2015-06-10 22:44:12 UTC (rev 185433)
+++ trunk/Source/WebCore/page/PerformanceTiming.h	2015-06-10 22:53:42 UTC (rev 185434)
@@ -77,7 +77,7 @@
     const DocumentTiming* documentTiming() const;
     DocumentLoader* documentLoader() const;
     DocumentLoadTiming* documentLoadTiming() const;
-    unsigned long long resourceLoadTimeRelativeToAbsolute(int) const;
+    unsigned long long resourceLoadTimeRelativeToFetchStart(int) const;
     unsigned long long monotonicTimeToIntegerMilliseconds(double) const;
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to