summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authorbrg@chromium.com <brg@chromium.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-22 00:24:39 +0000
committerbrg@chromium.com <brg@chromium.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-22 00:24:39 +0000
commitcb4c06e9e7220aaab99b20cb34147f0623862377 (patch)
treeec44e0c8ee1dda0fd5ca0f5217edb198b2e94e23 /chrome/browser/sync
parent0b02866defff24397abdb969e189165ce0ec78b3 (diff)
downloadchromium_src-cb4c06e9e7220aaab99b20cb34147f0623862377.zip
chromium_src-cb4c06e9e7220aaab99b20cb34147f0623862377.tar.gz
chromium_src-cb4c06e9e7220aaab99b20cb34147f0623862377.tar.bz2
Reorganize UMA data to measure network latency on sync authorization.
Also, the max time for the merge/sync UI should be increased to minutes. BUG=none TEST=none Review URL: http://codereview.chromium.org/174170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/profile_sync_service.cc14
-rw-r--r--chrome/browser/sync/profile_sync_service.h5
2 files changed, 13 insertions, 6 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 9eb2acc..335e50d 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -257,6 +257,12 @@ void ProfileSyncService::OnAuthError() {
auth_error_time_ == base::TimeTicks::Now();
}
+ if (!auth_start_time_.is_null()) {
+ UMA_HISTOGRAM_TIMES("Sync.AuthorizationTimeInNetwork",
+ base::TimeTicks::Now() - auth_start_time_);
+ auth_start_time_ = base::TimeTicks();
+ }
+
is_auth_in_progress_ = false;
// Fan the notification out to interested UI-thread components.
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
@@ -329,17 +335,15 @@ void ProfileSyncService::OnUserSubmittedAuth(
is_auth_in_progress_ = true;
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
- base::TimeTicks start_time = base::TimeTicks::Now();
+ auth_start_time_ = base::TimeTicks::Now();
backend_->Authenticate(username, password);
- UMA_HISTOGRAM_TIMES("Sync.AuthorizationTime",
- base::TimeTicks::Now() - start_time);
}
void ProfileSyncService::OnUserAcceptedMergeAndSync() {
base::TimeTicks start_time = base::TimeTicks::Now();
bool merge_success = model_associator_->AssociateModels();
- UMA_HISTOGRAM_TIMES("Sync.BookmarkAssociationWithUITime",
- base::TimeTicks::Now() - start_time);
+ UMA_HISTOGRAM_MEDIUM_TIMES("Sync.UserPerceivedBookmarkAssociation",
+ base::TimeTicks::Now() - start_time);
wizard_.Step(SyncSetupWizard::DONE); // TODO(timsteele): error state?
if (!merge_success) {
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index ae2047e..d2a8c2d 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -246,7 +246,10 @@ class ProfileSyncService : public NotificationObserver,
// Sets the last synced time to the current time.
void UpdateLastSyncedTime();
- // Time at which error UI is presented for the NTP.
+ // Time at which we begin an attempt a GAIA authorization.
+ base::TimeTicks auth_start_time_;
+
+ // Time at which error UI is presented for the new tab page.
base::TimeTicks auth_error_time_;
// The profile whose data we are synchronizing.