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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181689
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-03-18 Chris Dumez <cdumez@apple.com>
+
+ [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.
+
+ Add diagnostic logging key needed for network efficacy logging.
+
+ * page/DiagnosticLoggingKeys.cpp:
+ (WebCore::DiagnosticLoggingKeys::retrievalRequestKey):
+ * page/DiagnosticLoggingKeys.h:
+
2015-03-18 Tim Horton <timothy_horton@apple.com>
Fix the build after r181660
return ASCIILiteral("reload");
}
+String DiagnosticLoggingKeys::retrievalRequestKey()
+{
+ return ASCIILiteral("retrievalRequest");
+}
+
String DiagnosticLoggingKeys::resourceKey()
{
return ASCIILiteral("resource");
static String resourceRequestKey();
static String resourceResponseKey();
WEBCORE_EXPORT static String retrievalKey();
+ WEBCORE_EXPORT static String retrievalRequestKey();
static String revalidatingKey();
static String sameLoadKey();
static String scriptKey();
2015-03-18 Chris Dumez <cdumez@apple.com>
+ [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.
+
+ 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):
+
+2015-03-18 Chris Dumez <cdumez@apple.com>
+
[WK2] We should not even try the network cache for non-HTTP protocol requests
https://bugs.webkit.org/show_bug.cgi?id=142802
<rdar://problem/19632130>
LOG(NetworkCache, "(NetworkProcess) retrieving %s priority %u", originalRequest.url().string().ascii().data(), originalRequest.priority());
+ if (m_statistics)
+ m_statistics->recordRetrievalRequest(webPageID);
+
Key storageKey = makeCacheKey(originalRequest);
RetrieveDecision retrieveDecision = canRetrieve(originalRequest);
if (retrieveDecision != RetrieveDecision::Yes) {
void clear();
+ void recordRetrievalRequest(uint64_t webPageID);
void recordNotCachingResponse(const Key&, StoreDecision);
void recordNotUsingCacheForRequest(uint64_t webPageID, const Key&, const WebCore::ResourceRequest&, RetrieveDecision);
void recordRetrievalFailure(uint64_t webPageID, const Key&, const WebCore::ResourceRequest&);
});
}
+void Statistics::recordRetrievalRequest(uint64_t webPageID)
+{
+ NetworkProcess::singleton().logDiagnosticMessage(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalRequestKey(), WebCore::ShouldSample::Yes);
+}
+
void Statistics::recordNotCachingResponse(const Key& key, StoreDecision storeDecision)
{
ASSERT(storeDecision != StoreDecision::Yes);