⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181702 in webkit


Ignore:
Timestamp:
Mar 18, 2015, 10:50:52 AM (11 years ago)
Author:
Chris Dumez
Message:

[WK2] Log the number of network cache requests that we have never seen before
https://bugs.webkit.org/show_bug.cgi?id=142828
<rdar://problem/19632130>

Reviewed by Antti Koivisto.

Source/WebCore:

Add diagnostic logging key for network cache efficacy logging.

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
(WebCore::DiagnosticLoggingKeys::requestKey):

  • page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Log the number of network cache requests that we have never seen before
using diagnostic logging.

  • NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:

(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181699 r181702  
     12015-03-18  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Log the number of network cache requests that we have never seen before
     4        https://bugs.webkit.org/show_bug.cgi?id=142828
     5        <rdar://problem/19632130>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Add diagnostic logging key for network cache efficacy logging.
     10
     11        * page/DiagnosticLoggingKeys.cpp:
     12        (WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
     13        (WebCore::DiagnosticLoggingKeys::requestKey):
     14        * page/DiagnosticLoggingKeys.h:
     15
    1162015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
    217
  • trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp

    r181689 r181702  
    119119}
    120120
     121String DiagnosticLoggingKeys::neverSeenBeforeKey()
     122{
     123    return ASCIILiteral("neverSeenBefore");
     124}
     125
    121126String DiagnosticLoggingKeys::noCacheKey()
    122127{
     
    314319}
    315320
     321String DiagnosticLoggingKeys::requestKey()
     322{
     323    return ASCIILiteral("request");
     324}
     325
    316326String DiagnosticLoggingKeys::retrievalRequestKey()
    317327{
  • trunk/Source/WebCore/page/DiagnosticLoggingKeys.h

    r181689 r181702  
    7070    WEBCORE_EXPORT static String networkCacheKey();
    7171    static String networkKey();
     72    WEBCORE_EXPORT static String neverSeenBeforeKey();
    7273    static String noCacheKey();
    7374    static String noCurrentHistoryItemKey();
     
    9697    static String reloadFromOriginKey();
    9798    static String reloadKey();
     99    WEBCORE_EXPORT static String requestKey();
    98100    static String resourceKey();
    99101    static String resourceRequestKey();
  • trunk/Source/WebKit2/ChangeLog

    r181700 r181702  
     12015-03-18  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Log the number of network cache requests that we have never seen before
     4        https://bugs.webkit.org/show_bug.cgi?id=142828
     5        <rdar://problem/19632130>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Log the number of network cache requests that we have never seen before
     10        using diagnostic logging.
     11
     12        * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
     13        (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
     14        (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
     15
    1162015-03-17  Antti Koivisto  <antti@apple.com>
    217
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm

    r181689 r181702  
    220220            LOG(NetworkCache, "(NetworkProcess) webPageID %llu: %s was previously requested but we are not using the cache, reason: %s", webPageID, requestURL.string().ascii().data(), diagnosticKey.utf8().data());
    221221            NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::unusedKey(), diagnosticKey, WebCore::ShouldSample::Yes);
    222         } else
     222        } else {
     223            NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::requestKey(), WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey(), WebCore::ShouldSample::Yes);
    223224            markAsRequested(hash);
     225        }
    224226    });
    225227}
     
    254256            LOG(NetworkCache, "(NetworkProcess) webPageID %llu: %s was previously request but is not in the cache, reason: %s", webPageID, requestURL.string().ascii().data(), diagnosticKey.utf8().data());
    255257            NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::notInCacheKey(), diagnosticKey, WebCore::ShouldSample::Yes);
    256         } else
     258        } else {
     259            NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::requestKey(), WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey(), WebCore::ShouldSample::Yes);
    257260            markAsRequested(hash);
     261        }
    258262    });
    259263}
Note: See TracChangeset for help on using the changeset viewer.