Changeset 220568 in webkit


Ignore:
Timestamp:
Aug 10, 2017 5:41:09 PM (7 years ago)
Author:
wilander@apple.com
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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r220556 r220568  
     12017-08-10  John Wilander  <wilander@apple.com>
     2
     3        Resource Load Statistics: Add significant figures to telemetry calls
     4        https://bugs.webkit.org/show_bug.cgi?id=175442
     5        <rdar://problem/33834834>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        With this change, logged values are allowed to have 3 significant figures
     10        as opposed to today's 0 which is wrong.
     11
     12        * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
     13        (WebKit::submitTopList):
     14        (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
     15
    1162017-08-10  Mark Lam  <mark.lam@apple.com>
    217
  • trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp

    r219312 r220568  
    4242
    4343const unsigned minimumPrevalentResourcesForTelemetry = 3;
     44const unsigned significantFiguresForLoggedValues = 3;
    4445static bool notifyPagesWhenTelemetryWasCaptured = false;
    4546
     
    171172   
    172173    webPageProxy.logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), descriptionPreamble + "PrevalentResourcesWithUserInteraction",
    173         topPrevalentResourcesWithUserInteraction, 0, ShouldSample::No);
     174        topPrevalentResourcesWithUserInteraction, significantFiguresForLoggedValues, ShouldSample::No);
    174175    webPageProxy.logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), descriptionPreamble + "SubframeUnderTopFrameOrigins",
    175         topSubframeUnderTopFrameOrigins, 0, ShouldSample::No);
     176        topSubframeUnderTopFrameOrigins, significantFiguresForLoggedValues, ShouldSample::No);
    176177    webPageProxy.logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), descriptionPreamble + "SubresourceUnderTopFrameOrigins",
    177         topSubresourceUnderTopFrameOrigins, 0, ShouldSample::No);
     178        topSubresourceUnderTopFrameOrigins, significantFiguresForLoggedValues, ShouldSample::No);
    178179    webPageProxy.logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), descriptionPreamble + "SubresourceUniqueRedirectsTo",
    179         topSubresourceUniqueRedirectsTo, 0, ShouldSample::No);
     180        topSubresourceUniqueRedirectsTo, significantFiguresForLoggedValues, ShouldSample::No);
    180181    webPageProxy.logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), descriptionPreamble + "NumberOfTimesDataRecordsRemoved",
    181         topNumberOfTimesDataRecordsRemoved, 0, ShouldSample::No);
     182        topNumberOfTimesDataRecordsRemoved, significantFiguresForLoggedValues, ShouldSample::No);
    182183}
    183184   
     
    258259    }
    259260   
    260     webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("totalNumberOfPrevalentResources"), sortedPrevalentResources.size(), 0, ShouldSample::No);
    261     webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("totalNumberOfPrevalentResourcesWithUserInteraction"), prevalentResourcesDaysSinceUserInteraction.size(), 0, ShouldSample::No);
     261    webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("totalNumberOfPrevalentResources"), sortedPrevalentResources.size(), significantFiguresForLoggedValues, ShouldSample::No);
     262    webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("totalNumberOfPrevalentResourcesWithUserInteraction"), prevalentResourcesDaysSinceUserInteraction.size(), significantFiguresForLoggedValues, ShouldSample::No);
    262263   
    263264    if (prevalentResourcesDaysSinceUserInteraction.size() > 0)
    264         webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("topPrevalentResourceWithUserInteractionDaysSinceUserInteraction"), prevalentResourcesDaysSinceUserInteraction[0], 0, ShouldSample::No);
     265        webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("topPrevalentResourceWithUserInteractionDaysSinceUserInteraction"), prevalentResourcesDaysSinceUserInteraction[0], significantFiguresForLoggedValues, ShouldSample::No);
    265266    if (prevalentResourcesDaysSinceUserInteraction.size() > 1)
    266         webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("medianPrevalentResourcesWithUserInteractionDaysSinceUserInteraction"), median(prevalentResourcesDaysSinceUserInteraction), 0, ShouldSample::No);
     267        webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("medianPrevalentResourcesWithUserInteractionDaysSinceUserInteraction"), median(prevalentResourcesDaysSinceUserInteraction), significantFiguresForLoggedValues, ShouldSample::No);
    267268   
    268269    submitTopLists(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, *webPageProxy);
Note: See TracChangeset for help on using the changeset viewer.