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

Unified Diff: net/url_request/url_request_throttler_entry.cc

Issue 7027040: Implement A/B experiment for anti-DDoS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Extend trial cut-off date to July 23rd. Created 9 years, 6 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 | « chrome/common/pref_names.cc ('k') | net/url_request/url_request_throttler_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_throttler_entry.cc
diff --git a/net/url_request/url_request_throttler_entry.cc b/net/url_request/url_request_throttler_entry.cc
index ca29fe06b9d90b4eac2008bfb18ad23ad6e54f47..bf831caec1bacc90994495cd879f78e637c2a50c 100644
--- a/net/url_request/url_request_throttler_entry.cc
+++ b/net/url_request/url_request_throttler_entry.cc
@@ -199,9 +199,10 @@ bool URLRequestThrottlerEntry::IsDuringExponentialBackoff() const {
int reject_count = reject_request ? 1 : 0;
UMA_HISTOGRAM_ENUMERATION(
"Throttling.RequestThrottled", reject_count, 2);
- if (base::FieldTrialList::TrialExists("ThrottlingEnabled")) {
+ if (base::FieldTrialList::TrialExists("HttpThrottlingEnabled")) {
UMA_HISTOGRAM_ENUMERATION(base::FieldTrial::MakeName(
- "Throttling.RequestThrottled", "ThrottlingEnabled"), reject_count, 2);
+ "Throttling.RequestThrottled", "HttpThrottlingEnabled"),
+ reject_count, 2);
}
return reject_request;
@@ -367,10 +368,10 @@ void URLRequestThrottlerEntry::HandleCustomRetryAfter(
UMA_HISTOGRAM_CUSTOM_TIMES(
"Throttling.CustomRetryAfterMs", value,
base::TimeDelta::FromSeconds(1), base::TimeDelta::FromHours(12), 50);
- if (base::FieldTrialList::TrialExists("ThrottlingEnabled")) {
+ if (base::FieldTrialList::TrialExists("HttpThrottlingEnabled")) {
UMA_HISTOGRAM_CUSTOM_TIMES(
base::FieldTrial::MakeName("Throttling.CustomRetryAfterMs",
- "ThrottlingEnabled"), value,
+ "HttpThrottlingEnabled"), value,
base::TimeDelta::FromSeconds(1), base::TimeDelta::FromHours(12), 50);
}
}
@@ -393,10 +394,10 @@ void URLRequestThrottlerEntry::HandleMetricsTracking(int response_code) {
// to make sure we count only the responses seen by throttling.
// TODO(joi): Remove after experiment.
UMA_HISTOGRAM_ENUMERATION("Throttling.HttpResponseCode", response_code, 600);
- if (base::FieldTrialList::TrialExists("ThrottlingEnabled")) {
+ if (base::FieldTrialList::TrialExists("HttpThrottlingEnabled")) {
UMA_HISTOGRAM_ENUMERATION(
base::FieldTrial::MakeName("Throttling.HttpResponseCode",
- "ThrottlingEnabled"),
+ "HttpThrottlingEnabled"),
response_code, 600);
}
@@ -419,12 +420,12 @@ void URLRequestThrottlerEntry::HandleMetricsTracking(int response_code) {
base::TimeDelta::FromMilliseconds(10),
base::TimeDelta::FromHours(6), 50);
- if (base::FieldTrialList::TrialExists("ThrottlingEnabled")) {
+ if (base::FieldTrialList::TrialExists("HttpThrottlingEnabled")) {
UMA_HISTOGRAM_COUNTS(base::FieldTrial::MakeName(
- "Throttling.FailureCountAtSuccess", "ThrottlingEnabled"),
+ "Throttling.FailureCountAtSuccess", "HttpThrottlingEnabled"),
failure_count);
UMA_HISTOGRAM_CUSTOM_TIMES(base::FieldTrial::MakeName(
- "Throttling.PerceivedDowntime", "ThrottlingEnabled"), down_time,
+ "Throttling.PerceivedDowntime", "HttpThrottlingEnabled"), down_time,
base::TimeDelta::FromMilliseconds(10),
base::TimeDelta::FromHours(6), 50);
}
« no previous file with comments | « chrome/common/pref_names.cc ('k') | net/url_request/url_request_throttler_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698