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

Unified Diff: chrome/test/live_sync/performance/typed_urls_sync_perf_test.cc

Issue 7484007: Move sync performance tests into new target (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-upload again Created 9 years, 5 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/performance/typed_urls_sync_perf_test.cc
diff --git a/chrome/test/live_sync/performance_live_typed_urls_sync_test.cc b/chrome/test/live_sync/performance/typed_urls_sync_perf_test.cc
similarity index 77%
rename from chrome/test/live_sync/performance_live_typed_urls_sync_test.cc
rename to chrome/test/live_sync/performance/typed_urls_sync_perf_test.cc
index c4b3ce6c80b95b3fc6f40fb5744bdcd8e8c12ee6..6e910a9b4fabc5d3e994839ddaf129643ba85a5d 100644
--- a/chrome/test/live_sync/performance_live_typed_urls_sync_test.cc
+++ b/chrome/test/live_sync/performance/typed_urls_sync_perf_test.cc
@@ -4,7 +4,7 @@
#include "base/stringprintf.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
-#include "chrome/test/live_sync/live_sync_timing_helper.h"
+#include "chrome/test/live_sync/performance/sync_timing_helper.h"
#include "chrome/test/live_sync/live_typed_urls_sync_test.h"
static const size_t kNumUrls = 150;
@@ -17,10 +17,10 @@ static const size_t kBenchmarkPoints[] = {1, 10, 20, 30, 40, 50, 75, 100, 125,
// TODO(braffert): Move this class into its own .h/.cc files. What should the
// class files be named as opposed to the file containing the tests themselves?
-class PerformanceLiveTypedUrlsSyncTest
+class TypedUrlsSyncPerfTest
: public TwoClientLiveTypedUrlsSyncTest {
public:
- PerformanceLiveTypedUrlsSyncTest() : url_number(0) {}
+ TypedUrlsSyncPerfTest() : url_number(0) {}
// Adds |num_urls| new unique typed urls to |profile|.
void AddURLs(int profile, int num_urls);
@@ -43,16 +43,16 @@ class PerformanceLiveTypedUrlsSyncTest
GURL IntToURL(int n);
int url_number;
- DISALLOW_COPY_AND_ASSIGN(PerformanceLiveTypedUrlsSyncTest);
+ DISALLOW_COPY_AND_ASSIGN(TypedUrlsSyncPerfTest);
};
-void PerformanceLiveTypedUrlsSyncTest::AddURLs(int profile, int num_urls) {
+void TypedUrlsSyncPerfTest::AddURLs(int profile, int num_urls) {
for (int i = 0; i < num_urls; ++i) {
AddUrlToHistory(profile, NextURL());
}
}
-void PerformanceLiveTypedUrlsSyncTest::UpdateURLs(int profile) {
+void TypedUrlsSyncPerfTest::UpdateURLs(int profile) {
std::vector<history::URLRow> urls = GetTypedUrlsFromClient(profile);
for (std::vector<history::URLRow>::const_iterator it = urls.begin();
it != urls.end(); ++it) {
@@ -60,7 +60,7 @@ void PerformanceLiveTypedUrlsSyncTest::UpdateURLs(int profile) {
}
}
-void PerformanceLiveTypedUrlsSyncTest::RemoveURLs(int profile) {
+void TypedUrlsSyncPerfTest::RemoveURLs(int profile) {
std::vector<history::URLRow> urls = GetTypedUrlsFromClient(profile);
for (std::vector<history::URLRow>::const_iterator it = urls.begin();
it != urls.end(); ++it) {
@@ -68,7 +68,7 @@ void PerformanceLiveTypedUrlsSyncTest::RemoveURLs(int profile) {
}
}
-void PerformanceLiveTypedUrlsSyncTest::Cleanup() {
+void TypedUrlsSyncPerfTest::Cleanup() {
for (int i = 0; i < num_clients(); ++i) {
RemoveURLs(i);
}
@@ -77,21 +77,21 @@ void PerformanceLiveTypedUrlsSyncTest::Cleanup() {
AssertAllProfilesHaveSameURLsAsVerifier();
}
-GURL PerformanceLiveTypedUrlsSyncTest::NextURL() {
+GURL TypedUrlsSyncPerfTest::NextURL() {
return IntToURL(url_number++);
}
-GURL PerformanceLiveTypedUrlsSyncTest::IntToURL(int n) {
+GURL TypedUrlsSyncPerfTest::IntToURL(int n) {
return GURL(StringPrintf("http://history%d.google.com/", n));
}
// TCM ID - 7985716.
-IN_PROC_BROWSER_TEST_F(PerformanceLiveTypedUrlsSyncTest, Add) {
+IN_PROC_BROWSER_TEST_F(TypedUrlsSyncPerfTest, Add) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
AddURLs(0, kNumUrls);
base::TimeDelta dt =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(kNumUrls, GetTypedUrlsFromClient(0).size());
AssertAllProfilesHaveSameURLsAsVerifier();
@@ -100,7 +100,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveTypedUrlsSyncTest, Add) {
}
// TCM ID - 7981755.
-IN_PROC_BROWSER_TEST_F(PerformanceLiveTypedUrlsSyncTest, Update) {
+IN_PROC_BROWSER_TEST_F(TypedUrlsSyncPerfTest, Update) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
AddURLs(0, kNumUrls);
@@ -108,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveTypedUrlsSyncTest, Update) {
UpdateURLs(0);
base::TimeDelta dt =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(kNumUrls, GetTypedUrlsFromClient(0).size());
AssertAllProfilesHaveSameURLsAsVerifier();
@@ -117,7 +117,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveTypedUrlsSyncTest, Update) {
}
// TCM ID - 7651271
-IN_PROC_BROWSER_TEST_F(PerformanceLiveTypedUrlsSyncTest, Delete) {
+IN_PROC_BROWSER_TEST_F(TypedUrlsSyncPerfTest, Delete) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
AddURLs(0, kNumUrls);
@@ -125,7 +125,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveTypedUrlsSyncTest, Delete) {
RemoveURLs(0);
base::TimeDelta dt =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(0U, GetTypedUrlsFromClient(0).size());
AssertAllProfilesHaveSameURLsAsVerifier();
@@ -133,21 +133,21 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveTypedUrlsSyncTest, Delete) {
VLOG(0) << std::endl << "dt: " << dt.InSecondsF() << " s";
}
-IN_PROC_BROWSER_TEST_F(PerformanceLiveTypedUrlsSyncTest, DISABLED_Benchmark) {
+IN_PROC_BROWSER_TEST_F(TypedUrlsSyncPerfTest, DISABLED_Benchmark) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
for (size_t i = 0; i < kNumBenchmarkPoints; ++i) {
size_t num_urls = kBenchmarkPoints[i];
AddURLs(0, num_urls);
base::TimeDelta dt_add =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_urls, GetTypedUrlsFromClient(0).size());
AssertAllProfilesHaveSameURLsAsVerifier();
VLOG(0) << std::endl << "Add: " << num_urls << " " << dt_add.InSecondsF();
UpdateURLs(0);
base::TimeDelta dt_update =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_urls, GetTypedUrlsFromClient(0).size());
AssertAllProfilesHaveSameURLsAsVerifier();
VLOG(0) << std::endl << "Update: " << num_urls << " "
@@ -155,7 +155,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveTypedUrlsSyncTest, DISABLED_Benchmark) {
RemoveURLs(0);
base::TimeDelta dt_delete =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(0U, GetTypedUrlsFromClient(0).size());
AssertAllProfilesHaveSameURLsAsVerifier();
VLOG(0) << std::endl << "Delete: " << num_urls << " "
« no previous file with comments | « chrome/test/live_sync/performance/sync_timing_helper.cc ('k') | chrome/test/live_sync/performance_live_autofill_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698