Title: [220568] trunk/Source/WebKit
Revision
220568
Author
wilan...@apple.com
Date
2017-08-10 17:41:09 -0700 (Thu, 10 Aug 2017)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (220567 => 220568)


--- trunk/Source/WebKit/ChangeLog	2017-08-11 00:36:24 UTC (rev 220567)
+++ trunk/Source/WebKit/ChangeLog	2017-08-11 00:41:09 UTC (rev 220568)
@@ -1,3 +1,18 @@
+2017-08-10  John Wilander  <wilan...@apple.com>
+
+        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-08-10  Mark Lam  <mark....@apple.com>
 
         Apply the UNLIKELY macro to some unlikely things.

Modified: trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp (220567 => 220568)


--- trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp	2017-08-11 00:36:24 UTC (rev 220567)
+++ trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp	2017-08-11 00:41:09 UTC (rev 220568)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to