Title: [181702] trunk/Source
Revision
181702
Author
[email protected]
Date
2015-03-18 10:50:52 -0700 (Wed, 18 Mar 2015)

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (181701 => 181702)


--- trunk/Source/WebCore/ChangeLog	2015-03-18 17:40:56 UTC (rev 181701)
+++ trunk/Source/WebCore/ChangeLog	2015-03-18 17:50:52 UTC (rev 181702)
@@ -1,3 +1,18 @@
+2015-03-18  Chris Dumez  <[email protected]>
+
+        [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.
+
+        Add diagnostic logging key for network cache efficacy logging.
+
+        * page/DiagnosticLoggingKeys.cpp:
+        (WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
+        (WebCore::DiagnosticLoggingKeys::requestKey):
+        * page/DiagnosticLoggingKeys.h:
+
 2015-03-18  Yusuke Suzuki  <[email protected]>
 
         Use filterRootId in SelectorQuery even if CSS JIT is not enabled

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (181701 => 181702)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2015-03-18 17:40:56 UTC (rev 181701)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2015-03-18 17:50:52 UTC (rev 181702)
@@ -118,6 +118,11 @@
     return ASCIILiteral("network");
 }
 
+String DiagnosticLoggingKeys::neverSeenBeforeKey()
+{
+    return ASCIILiteral("neverSeenBefore");
+}
+
 String DiagnosticLoggingKeys::noCacheKey()
 {
     return ASCIILiteral("noCache");
@@ -313,6 +318,11 @@
     return ASCIILiteral("reload");
 }
 
+String DiagnosticLoggingKeys::requestKey()
+{
+    return ASCIILiteral("request");
+}
+
 String DiagnosticLoggingKeys::retrievalRequestKey()
 {
     return ASCIILiteral("retrievalRequest");

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (181701 => 181702)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2015-03-18 17:40:56 UTC (rev 181701)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2015-03-18 17:50:52 UTC (rev 181702)
@@ -69,6 +69,7 @@
     static String navigationKey();
     WEBCORE_EXPORT static String networkCacheKey();
     static String networkKey();
+    WEBCORE_EXPORT static String neverSeenBeforeKey();
     static String noCacheKey();
     static String noCurrentHistoryItemKey();
     static String noDocumentLoaderKey();
@@ -95,6 +96,7 @@
     static String reasonKey();
     static String reloadFromOriginKey();
     static String reloadKey();
+    WEBCORE_EXPORT static String requestKey();
     static String resourceKey();
     static String resourceRequestKey();
     static String resourceResponseKey();

Modified: trunk/Source/WebKit2/ChangeLog (181701 => 181702)


--- trunk/Source/WebKit2/ChangeLog	2015-03-18 17:40:56 UTC (rev 181701)
+++ trunk/Source/WebKit2/ChangeLog	2015-03-18 17:50:52 UTC (rev 181702)
@@ -1,3 +1,18 @@
+2015-03-18  Chris Dumez  <[email protected]>
+
+        [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.
+
+        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):
+
 2015-03-17  Antti Koivisto  <[email protected]>
 
         Prune least valuable cache entries first

Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm (181701 => 181702)


--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm	2015-03-18 17:40:56 UTC (rev 181701)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm	2015-03-18 17:50:52 UTC (rev 181702)
@@ -219,8 +219,10 @@
             String diagnosticKey = retrieveDecisionToDiagnosticKey(retrieveDecision);
             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());
             NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::unusedKey(), diagnosticKey, WebCore::ShouldSample::Yes);
-        } else
+        } else {
+            NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::requestKey(), WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey(), WebCore::ShouldSample::Yes);
             markAsRequested(hash);
+        }
     });
 }
 
@@ -253,8 +255,10 @@
             String diagnosticKey = storeDecisionToDiagnosticKey(storeDecision.value());
             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());
             NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::notInCacheKey(), diagnosticKey, WebCore::ShouldSample::Yes);
-        } else
+        } else {
+            NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::requestKey(), WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey(), WebCore::ShouldSample::Yes);
             markAsRequested(hash);
+        }
     });
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to