Title: [221902] branches/safari-604-branch/Source/WebKit
Revision
221902
Author
[email protected]
Date
2017-09-11 22:50:35 -0700 (Mon, 11 Sep 2017)

Log Message

Cherry-pick r220568. rdar://problem/34142025

Modified Paths

Diff

Modified: branches/safari-604-branch/Source/WebKit/ChangeLog (221901 => 221902)


--- branches/safari-604-branch/Source/WebKit/ChangeLog	2017-09-12 05:06:07 UTC (rev 221901)
+++ branches/safari-604-branch/Source/WebKit/ChangeLog	2017-09-12 05:50:35 UTC (rev 221902)
@@ -1,3 +1,22 @@
+2017-09-10  Jason Marcell  <[email protected]>
+
+        Cherry-pick r220568. rdar://problem/34142025
+
+    2017-08-10  John Wilander  <[email protected]>
+
+            Resource Load Statistics: Add significant figures to telemetry calls
+            https://bugs.webkit.org/show_bug.cgi?id=175442
+            <rdar://problem/33834834>
+
+            Reviewed by Brent Fulgham.
+
+            With this change, logged values are allowed to have 3 significant figures
+            as opposed to today's 0 which is wrong.
+
+            * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
+            (WebKit::submitTopList):
+            (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
+
 2017-09-05  Matthew Hanson  <[email protected]>
 
         Cherry-pick r221444. rdar://problem/34215746

Modified: branches/safari-604-branch/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp (221901 => 221902)


--- branches/safari-604-branch/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp	2017-09-12 05:06:07 UTC (rev 221901)
+++ branches/safari-604-branch/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp	2017-09-12 05:50:35 UTC (rev 221902)
@@ -41,6 +41,7 @@
 namespace WebKit {
 
 const unsigned minimumPrevalentResourcesForTelemetry = 3;
+const unsigned significantFiguresForLoggedValues = 3;
 static bool notifyPagesWhenTelemetryWasCaptured = false;
 
 struct PrevalentResourceTelemetry {
@@ -170,15 +171,15 @@
     String descriptionPreamble = preambleBuilder.toString();
     
     webPageProxy.logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), descriptionPreamble + "PrevalentResourcesWithUserInteraction",
-        topPrevalentResourcesWithUserInteraction, 0, ShouldSample::No);
+        topPrevalentResourcesWithUserInteraction, significantFiguresForLoggedValues, ShouldSample::No);
     webPageProxy.logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), descriptionPreamble + "SubframeUnderTopFrameOrigins",
-        topSubframeUnderTopFrameOrigins, 0, ShouldSample::No);
+        topSubframeUnderTopFrameOrigins, significantFiguresForLoggedValues, ShouldSample::No);
     webPageProxy.logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), descriptionPreamble + "SubresourceUnderTopFrameOrigins",
-        topSubresourceUnderTopFrameOrigins, 0, ShouldSample::No);
+        topSubresourceUnderTopFrameOrigins, significantFiguresForLoggedValues, ShouldSample::No);
     webPageProxy.logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), descriptionPreamble + "SubresourceUniqueRedirectsTo",
-        topSubresourceUniqueRedirectsTo, 0, ShouldSample::No);
+        topSubresourceUniqueRedirectsTo, significantFiguresForLoggedValues, ShouldSample::No);
     webPageProxy.logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), descriptionPreamble + "NumberOfTimesDataRecordsRemoved",
-        topNumberOfTimesDataRecordsRemoved, 0, ShouldSample::No);
+        topNumberOfTimesDataRecordsRemoved, significantFiguresForLoggedValues, ShouldSample::No);
 }
     
 static void submitTopLists(const Vector<PrevalentResourceTelemetry>& sortedPrevalentResources, const Vector<PrevalentResourceTelemetry>& sortedPrevalentResourcesWithoutUserInteraction, WebPageProxy& webPageProxy)
@@ -257,13 +258,13 @@
         return;
     }
     
-    webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("totalNumberOfPrevalentResources"), sortedPrevalentResources.size(), 0, ShouldSample::No);
-    webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("totalNumberOfPrevalentResourcesWithUserInteraction"), prevalentResourcesDaysSinceUserInteraction.size(), 0, ShouldSample::No);
+    webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("totalNumberOfPrevalentResources"), sortedPrevalentResources.size(), significantFiguresForLoggedValues, ShouldSample::No);
+    webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("totalNumberOfPrevalentResourcesWithUserInteraction"), prevalentResourcesDaysSinceUserInteraction.size(), significantFiguresForLoggedValues, ShouldSample::No);
     
     if (prevalentResourcesDaysSinceUserInteraction.size() > 0)
-        webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("topPrevalentResourceWithUserInteractionDaysSinceUserInteraction"), prevalentResourcesDaysSinceUserInteraction[0], 0, ShouldSample::No);
+        webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("topPrevalentResourceWithUserInteractionDaysSinceUserInteraction"), prevalentResourcesDaysSinceUserInteraction[0], significantFiguresForLoggedValues, ShouldSample::No);
     if (prevalentResourcesDaysSinceUserInteraction.size() > 1)
-        webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("medianPrevalentResourcesWithUserInteractionDaysSinceUserInteraction"), median(prevalentResourcesDaysSinceUserInteraction), 0, ShouldSample::No);
+        webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("medianPrevalentResourcesWithUserInteractionDaysSinceUserInteraction"), median(prevalentResourcesDaysSinceUserInteraction), significantFiguresForLoggedValues, ShouldSample::No);
     
     submitTopLists(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, *webPageProxy);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to