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

Changeset 181689 in webkit


Ignore:
Timestamp:
Mar 18, 2015, 12:27:53 AM (11 years ago)
Author:
Chris Dumez
Message:

[WK2] Log total number of network cache queries using diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=142803
<rdar://problem/19632130>

Reviewed by Antti Koivisto.

Source/WebCore:

Add diagnostic logging key needed for network efficacy logging.

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::retrievalRequestKey):

  • page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Log total number of network cache queries using diagnostic logging.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::retrieve):

  • NetworkProcess/cache/NetworkCacheStatistics.h:
  • NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:

(WebKit::NetworkCache::Statistics::recordCacheRetrievalRequest):

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181687 r181689  
     12015-03-18  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Log total number of network cache queries using diagnostic logging
     4        https://bugs.webkit.org/show_bug.cgi?id=142803
     5        <rdar://problem/19632130>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Add diagnostic logging key needed for network efficacy logging.
     10
     11        * page/DiagnosticLoggingKeys.cpp:
     12        (WebCore::DiagnosticLoggingKeys::retrievalRequestKey):
     13        * page/DiagnosticLoggingKeys.h:
     14
    1152015-03-18  Tim Horton  <timothy_horton@apple.com>
    216
  • trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp

    r180770 r181689  
    314314}
    315315
     316String DiagnosticLoggingKeys::retrievalRequestKey()
     317{
     318    return ASCIILiteral("retrievalRequest");
     319}
     320
    316321String DiagnosticLoggingKeys::resourceKey()
    317322{
  • trunk/Source/WebCore/page/DiagnosticLoggingKeys.h

    r180770 r181689  
    100100    static String resourceResponseKey();
    101101    WEBCORE_EXPORT static String retrievalKey();
     102    WEBCORE_EXPORT static String retrievalRequestKey();
    102103    static String revalidatingKey();
    103104    static String sameLoadKey();
  • trunk/Source/WebKit2/ChangeLog

    r181688 r181689  
     12015-03-18  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Log total number of network cache queries using diagnostic logging
     4        https://bugs.webkit.org/show_bug.cgi?id=142803
     5        <rdar://problem/19632130>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Log total number of network cache queries using diagnostic logging.
     10
     11        * NetworkProcess/cache/NetworkCache.cpp:
     12        (WebKit::NetworkCache::Cache::retrieve):
     13        * NetworkProcess/cache/NetworkCacheStatistics.h:
     14        * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
     15        (WebKit::NetworkCache::Statistics::recordCacheRetrievalRequest):
     16
    1172015-03-18  Chris Dumez  <cdumez@apple.com>
    218
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp

    r181688 r181689  
    263263
    264264    LOG(NetworkCache, "(NetworkProcess) retrieving %s priority %u", originalRequest.url().string().ascii().data(), originalRequest.priority());
     265
     266    if (m_statistics)
     267        m_statistics->recordRetrievalRequest(webPageID);
    265268
    266269    Key storageKey = makeCacheKey(originalRequest);
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h

    r181140 r181689  
    4848    void clear();
    4949
     50    void recordRetrievalRequest(uint64_t webPageID);
    5051    void recordNotCachingResponse(const Key&, StoreDecision);
    5152    void recordNotUsingCacheForRequest(uint64_t webPageID, const Key&, const WebCore::ResourceRequest&, RetrieveDecision);
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm

    r181688 r181689  
    177177        LOG(NetworkCache, "(NetworkProcess) statistics cache shrink completed m_approximateEntryCount=%lu", static_cast<size_t>(m_approximateEntryCount));
    178178    });
     179}
     180
     181void Statistics::recordRetrievalRequest(uint64_t webPageID)
     182{
     183    NetworkProcess::singleton().logDiagnosticMessage(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalRequestKey(), WebCore::ShouldSample::Yes);
    179184}
    180185
Note: See TracChangeset for help on using the changeset viewer.