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

Unified Diff: chrome/test/live_sync/live_sync_timing_helper.cc

Issue 7171003: Performance tests for bookmark sync. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Adding TCM IDs Created 9 years, 6 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
Index: chrome/test/live_sync/live_sync_timing_helper.cc
diff --git a/chrome/test/live_sync/live_sync_timing_helper.cc b/chrome/test/live_sync/live_sync_timing_helper.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d910c99c56009273788187ca016b117707baa94e
--- /dev/null
+++ b/chrome/test/live_sync/live_sync_timing_helper.cc
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/test/live_sync/live_sync_timing_helper.h"
+
+#include "base/time.h"
+#include "chrome/browser/sync/profile_sync_service_harness.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+LiveSyncTimingHelper::LiveSyncTimingHelper() {}
+
+LiveSyncTimingHelper::~LiveSyncTimingHelper() {}
+
+base::TimeDelta LiveSyncTimingHelper::TimeSyncCycle(
+ ProfileSyncServiceHarness* client) {
+ base::Time start = base::Time::Now();
+ EXPECT_TRUE(client->AwaitSyncCycleCompletion("Timing sync cycle."));
+ return base::Time::Now() - start;
+}
+
+base::TimeDelta LiveSyncTimingHelper::TimeMutualSyncCycle(
+ ProfileSyncServiceHarness* client, ProfileSyncServiceHarness* partner) {
+ base::Time start = base::Time::Now();
+ EXPECT_TRUE(client->AwaitMutualSyncCycleCompletion(partner));
+ return base::Time::Now() - start;
+}
+
+base::TimeDelta LiveSyncTimingHelper::TimeUntilQuiescence(
+ std::vector<ProfileSyncServiceHarness*>& clients) {
+ base::Time start = base::Time::Now();
+ EXPECT_TRUE(ProfileSyncServiceHarness::AwaitQuiescence(clients));
+ return base::Time::Now() - start;
+}
« no previous file with comments | « chrome/test/live_sync/live_sync_timing_helper.h ('k') | chrome/test/live_sync/performance_live_bookmarks_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698