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

Unified Diff: net/http/http_cache_transaction.h

Issue 1969663003: [HttpCache] Measure causes for cache validation requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Treat unconditionalizable requests separately Created 4 years, 7 months 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 | « no previous file | net/http/http_cache_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.h
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index 0c9b11253543ac44c65986bdd743c45870c03972..8e26337820396e3fd9f1825012df736f2c159dcd 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -246,6 +246,18 @@ class HttpCache::Transaction : public HttpTransaction {
PATTERN_MAX,
};
+ // Used for categorizing validation triggers in histograms.
+ // NOTE: This enumeration is used in histograms, so please do not add entries
+ // in the middle.
+ enum ValidationCause {
+ VALIDATION_CAUSE_UNDEFINED,
+ VALIDATION_CAUSE_VARY_MISMATCH,
+ VALIDATION_CAUSE_VALIDATE_FLAG,
+ VALIDATION_CAUSE_STALE,
+ VALIDATION_CAUSE_ZERO_FRESHNESS,
+ VALIDATION_CAUSE_MAX
+ };
+
// Runs the state transition loop. Resets and calls |callback_| on exit,
// unless the return value is ERR_IO_PENDING.
int DoLoop(int result);
@@ -468,6 +480,7 @@ class HttpCache::Transaction : public HttpTransaction {
// Members used to track data for histograms.
TransactionPattern transaction_pattern_;
+ ValidationCause validation_cause_;
base::TimeTicks entry_lock_waiting_since_;
base::TimeTicks first_cache_access_since_;
base::TimeTicks send_request_since_;
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698