Remove some unused Net.* and DomainReliability.* histograms.
Bug: 782083, 782080, 775334, 755429, 753204
Bug: 753200, 745187, 719792, 689320, 656857
Bug: 784721
Change-Id: I5e1c231d1a286891d61349454b1dc6c13cfda295
Reviewed-on: https://chromium-review.googlesource.com/766955
Commit-Queue: Matt Menke <[email protected]>
Reviewed-by: Alexei Svitkine <[email protected]>
Reviewed-by: Matt Menke <[email protected]>
Cr-Commit-Position: refs/heads/master@{#516361}
diff --git a/components/domain_reliability/context.cc b/components/domain_reliability/context.cc
index 3754f29..a68bf85d 100644
--- a/components/domain_reliability/context.cc
+++ b/components/domain_reliability/context.cc
@@ -26,12 +26,6 @@
namespace domain_reliability {
-namespace {
-void LogOnBeaconDidEvictHistogram(bool evicted) {
- UMA_HISTOGRAM_BOOLEAN("DomainReliability.OnBeaconDidEvict", evicted);
-}
-} // namespace
-
// static
const int DomainReliabilityContext::kMaxUploadDepthToSchedule = 1;
@@ -69,34 +63,16 @@
ClearBeacons();
}
-bool DomainReliabilityContext::OnBeacon(
+void DomainReliabilityContext::OnBeacon(
std::unique_ptr<DomainReliabilityBeacon> beacon) {
bool success = (beacon->status == "ok");
double sample_rate = beacon->details.quic_port_migration_detected
? 1.0
: config().GetSampleRate(success);
- bool should_report = base::RandDouble() < sample_rate;
- UMA_HISTOGRAM_BOOLEAN("DomainReliability.BeaconReported", should_report);
- if (!should_report) {
- // If the beacon isn't queued to be reported, it definitely cannot evict
- // an older beacon. (This histogram is also logged below based on whether
- // an older beacon was actually evicted.)
- LogOnBeaconDidEvictHistogram(false);
- return false;
- }
+ if (base::RandDouble() >= sample_rate)
+ return;
beacon->sample_rate = sample_rate;
- UMA_HISTOGRAM_SPARSE_SLOWLY("DomainReliability.ReportedBeaconError",
- -beacon->chrome_error);
- if (!beacon->server_ip.empty()) {
- UMA_HISTOGRAM_SPARSE_SLOWLY(
- "DomainReliability.ReportedBeaconError_HasServerIP",
- -beacon->chrome_error);
- }
- UMA_HISTOGRAM_COUNTS_100("DomainReliability.ReportedBeaconUploadDepth",
- beacon->upload_depth);
- // TODO(juliatuttle): Histogram HTTP response code?
-
// Allow beacons about reports, but don't schedule an upload for more than
// one layer of recursion, to avoid infinite report loops.
if (beacon->upload_depth <= kMaxUploadDepthToSchedule)
@@ -105,17 +81,6 @@
bool should_evict = beacons_.size() > kMaxQueuedBeacons;
if (should_evict)
RemoveOldestBeacon();
-
- LogOnBeaconDidEvictHistogram(should_evict);
-
- base::TimeTicks now = base::TimeTicks::Now();
- if (last_queued_beacon_time_ != base::TimeTicks()) {
- UMA_HISTOGRAM_LONG_TIMES("DomainReliability.BeaconInterval",
- now - last_queued_beacon_time_);
- }
- last_queued_beacon_time_ = now;
-
- return true;
}
void DomainReliabilityContext::ClearBeacons() {
@@ -198,13 +163,6 @@
base::Bind(
&DomainReliabilityContext::OnUploadComplete,
weak_factory_.GetWeakPtr()));
-
- UMA_HISTOGRAM_SPARSE_SLOWLY("DomainReliability.UploadCollectorIndex",
- static_cast<int>(collector_index));
- if (!last_upload_time_.is_null()) {
- UMA_HISTOGRAM_LONG_TIMES("DomainReliability.UploadInterval",
- upload_time_ - last_upload_time_);
- }
}
void DomainReliabilityContext::OnUploadComplete(
@@ -223,8 +181,6 @@
DCHECK(!upload_time_.is_null());
UMA_HISTOGRAM_MEDIUM_TIMES("DomainReliability.UploadDuration",
now - upload_time_);
- UMA_HISTOGRAM_LONG_TIMES("DomainReliability.UploadCollectorRetryDelay",
- scheduler_.last_collector_retry_delay());
last_upload_time_ = upload_time_;
upload_time_ = base::TimeTicks();
}