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

Unified Diff: components/metrics/metrics_service.cc

Issue 1871733002: Add histograms for observing UMA throttling effect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | components/metrics/net/net_metrics_log_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_service.cc
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
index 315229b11d1f0e73a6fcf399d4427d64aa47b748..7215befad67a786ef1f4510ac38675c9543f4a60 100644
--- a/components/metrics/metrics_service.cc
+++ b/components/metrics/metrics_service.cc
@@ -882,13 +882,20 @@ void MetricsService::SendNextLog() {
// Proceed to stage the log for upload if log size satisfies cellular log
// upload constrains.
- if (client_->IsUMACellularUploadLogicEnabled() &&
+ bool upload_canceled = false;
+ bool is_cellular_logic = client_->IsUMACellularUploadLogicEnabled();
+ if (is_cellular_logic &&
!data_use_tracker_->ShouldUploadLogOnCellular(
log_manager_.staged_log_hash().size())) {
scheduler_->UploadCancelled();
+ upload_canceled = true;
} else {
SendStagedLog();
}
+ if (is_cellular_logic) {
+ UMA_HISTOGRAM_BOOLEAN("UMA.LogUpload.Canceled.CellularConstraint",
+ upload_canceled);
+ }
}
bool MetricsService::ProvidersHaveInitialStabilityMetrics() {
« no previous file with comments | « no previous file | components/metrics/net/net_metrics_log_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698