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

Unified Diff: google_apis/gcm/engine/registration_request.cc

Issue 270783002: [GCM] Add more UMA to GCM (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 6 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 | « google_apis/gcm/engine/registration_request.h ('k') | google_apis/gcm/engine/unregistration_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/registration_request.cc
diff --git a/google_apis/gcm/engine/registration_request.cc b/google_apis/gcm/engine/registration_request.cc
index dd3f3697474b97c9e1b1c274900c4cda6ffd99f4..e72e7ba2b79d8850d59c638f7c6af39b0721adc2 100644
--- a/google_apis/gcm/engine/registration_request.cc
+++ b/google_apis/gcm/engine/registration_request.cc
@@ -151,11 +151,14 @@ void RegistrationRequest::Start() {
senders.append(*iter);
}
BuildFormEncoding(kSenderKey, senders, &body);
+ UMA_HISTOGRAM_COUNTS("GCM.RegistrationSenderIdCount",
+ request_info_.sender_ids.size());
DVLOG(1) << "Performing registration for: " << request_info_.app_id;
DVLOG(1) << "Registration request: " << body;
url_fetcher_->SetUploadData(kRegistrationRequestContentType, body);
recorder_->RecordRegistrationSent(request_info_.app_id, senders);
+ request_start_time_ = base::TimeTicks::Now();
url_fetcher_->Start();
}
@@ -252,6 +255,12 @@ void RegistrationRequest::OnURLFetchComplete(const net::URLFetcher* source) {
RecordRegistrationStatusToUMA(status);
}
+ if (status == SUCCESS) {
+ UMA_HISTOGRAM_COUNTS("GCM.RegistrationRetryCount",
+ backoff_entry_.failure_count());
+ UMA_HISTOGRAM_TIMES("GCM.RegistrationCompleteTime",
+ base::TimeTicks::Now() - request_start_time_);
+ }
callback_.Run(status, token);
}
« no previous file with comments | « google_apis/gcm/engine/registration_request.h ('k') | google_apis/gcm/engine/unregistration_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698