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

Unified Diff: components/domain_reliability/context.cc

Issue 1785143003: [Domain Reliability: Monitor] Report beacon if the go away is detected, regardless of request statu… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set sample rate to 1.0 if beacon is sent for receives goway for port migration Created 4 years, 9 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 | « components/domain_reliability/beacon.cc ('k') | components/domain_reliability/context_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/domain_reliability/context.cc
diff --git a/components/domain_reliability/context.cc b/components/domain_reliability/context.cc
index 3dc324dd36f3d80baf008e988f48525ec69b1659..4d7c83e2008c1ba8899674f98edc559548cd5c1e 100644
--- a/components/domain_reliability/context.cc
+++ b/components/domain_reliability/context.cc
@@ -70,7 +70,9 @@ DomainReliabilityContext::~DomainReliabilityContext() {
void DomainReliabilityContext::OnBeacon(
scoped_ptr<DomainReliabilityBeacon> beacon) {
bool success = (beacon->status == "ok");
- double sample_rate = config().GetSampleRate(success);
+ double sample_rate = beacon->details.quic_port_migration_detected
Deprecated (see juliatuttle) 2016/03/14 13:19:20 nit: I'd prefer you do this with should_report, no
Zhongyi Shi 2016/03/14 17:12:42 I think the idea here is that 1. we want to report
Deprecated (see juliatuttle) 2016/03/14 17:18:35 Oh, you're right, I forgot we were recording sampl
+ ? 1.0
+ : config().GetSampleRate(success);
bool should_report = base::RandDouble() < sample_rate;
UMA_HISTOGRAM_BOOLEAN("DomainReliability.BeaconReported", should_report);
if (!should_report) {
« no previous file with comments | « components/domain_reliability/beacon.cc ('k') | components/domain_reliability/context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698