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..58f03e90357759c1fe0bf648a0aec41de2278d0a 100644 |
--- a/google_apis/gcm/engine/registration_request.cc |
+++ b/google_apis/gcm/engine/registration_request.cc |
@@ -92,6 +92,7 @@ RegistrationRequest::RequestInfo::RequestInfo( |
security_token(security_token), |
app_id(app_id), |
sender_ids(sender_ids) { |
+ UMA_HISTOGRAM_COUNTS("GCM.RegistrationSenderNumber", sender_ids.size()); |
fgorski
2014/05/08 18:08:36
nit: wouldn't that be more suitable in start?
jianli
2014/05/08 18:40:07
Done.
|
} |
RegistrationRequest::RequestInfo::~RequestInfo() {} |
@@ -156,6 +157,7 @@ void RegistrationRequest::Start() { |
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 +254,12 @@ void RegistrationRequest::OnURLFetchComplete(const net::URLFetcher* source) { |
RecordRegistrationStatusToUMA(status); |
} |
+ if (status == SUCCESS) { |
+ UMA_HISTOGRAM_COUNTS("GCM.RegistrationRetryNumber", |
fgorski
2014/05/08 18:08:36
Do we not care about the retry number if we don't
jianli
2014/05/08 18:40:07
Yes. See my comment above.
|
+ backoff_entry_.failure_count() + 1); |
fgorski
2014/05/08 18:08:36
nit: Technically number of retries is = failure co
jianli
2014/05/08 18:40:07
Original I mean the UMA was for total number of re
|
+ UMA_HISTOGRAM_TIMES("GCM.RegistrationCompleteTime", |
+ base::TimeTicks::Now() - request_start_time_); |
+ } |
callback_.Run(status, token); |
} |