Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: net/http/http_cache_transaction.cc

Issue 11637007: Split HttpCache miss tracking by Open and Create (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 3f59af233a994f6778fe380f0ba341a287e7b89d..02d1796bb8568bba34012df8d1a78c25f362585e 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -724,6 +724,7 @@ int HttpCache::Transaction::DoGetBackendComplete(int result) {
if (effective_load_flags_ & LOAD_ONLY_FROM_CACHE) {
mode_ = READ;
} else if (effective_load_flags_ & LOAD_BYPASS_CACHE) {
+ UpdateTransactionPattern(PATTERN_NOT_COVERED);
mode_ = WRITE;
} else {
mode_ = READ_WRITE;
@@ -960,6 +961,7 @@ int HttpCache::Transaction::DoOpenEntryComplete(int result) {
}
if (mode_ == READ_WRITE) {
+ miss_since_ = TimeTicks::Now();
mode_ = WRITE;
next_state_ = STATE_CREATE_ENTRY;
return OK;
@@ -2491,6 +2493,9 @@ void HttpCache::Transaction::RecordHistograms() {
UMA_HISTOGRAM_TIMES("HttpCache.BeforeSend.NotCached", before_send_time);
UMA_HISTOGRAM_PERCENTAGE("HttpCache.PercentBeforeSend.NotCached",
before_send_percent);
+ DCHECK(!miss_since_.is_null());
+ TimeDelta before_miss_time = miss_since_ - first_cache_access_since_;
+ UMA_HISTOGRAM_TIMES("HttpCache.BeforeCreate.NotCached", before_miss_time);
break;
}
case PATTERN_ENTRY_VALIDATED: {
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698