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

Unified Diff: chrome/test/live_sync/performance/autofill_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/autofill_sync_perf_test.cc
diff --git a/chrome/test/live_sync/performance_live_autofill_sync_test.cc b/chrome/test/live_sync/performance/autofill_sync_perf_test.cc
similarity index 77%
rename from chrome/test/live_sync/performance_live_autofill_sync_test.cc
rename to chrome/test/live_sync/performance/autofill_sync_perf_test.cc
index 456d32b2db6e01ec58df0b8693f60e5b13e156dc..a7a18c602ba3c796ddecc0a09cade2cd5604c5d4 100644
--- a/chrome/test/live_sync/performance_live_autofill_sync_test.cc
+++ b/chrome/test/live_sync/performance/autofill_sync_perf_test.cc
@@ -6,7 +6,7 @@
#include "chrome/browser/autofill/autofill_common_test.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
#include "chrome/test/live_sync/live_autofill_sync_test.h"
-#include "chrome/test/live_sync/live_sync_timing_helper.h"
+#include "chrome/test/live_sync/performance/sync_timing_helper.h"
static const int kNumProfiles = 150;
@@ -18,10 +18,10 @@ static const int 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 PerformanceLiveAutofillSyncTest
+class AutofillSyncPerfTest
: public TwoClientLiveAutofillSyncTest {
public:
- PerformanceLiveAutofillSyncTest() : guid_number_(0), name_number_(0) {}
+ AutofillSyncPerfTest() : guid_number_(0), name_number_(0) {}
// Adds |num_profiles| new autofill profiles to the sync profile |profile|.
void AddProfiles(int profile, int num_profiles);
@@ -54,10 +54,10 @@ class PerformanceLiveAutofillSyncTest
int guid_number_;
int name_number_;
- DISALLOW_COPY_AND_ASSIGN(PerformanceLiveAutofillSyncTest);
+ DISALLOW_COPY_AND_ASSIGN(AutofillSyncPerfTest);
};
-void PerformanceLiveAutofillSyncTest::AddProfiles(int profile,
+void AutofillSyncPerfTest::AddProfiles(int profile,
int num_profiles) {
const std::vector<AutofillProfile*>& all_profiles = GetAllProfiles(profile);
std::vector<AutofillProfile> autofill_profiles;
@@ -70,7 +70,7 @@ void PerformanceLiveAutofillSyncTest::AddProfiles(int profile,
SetProfiles(profile, &autofill_profiles);
}
-void PerformanceLiveAutofillSyncTest::UpdateProfiles(int profile) {
+void AutofillSyncPerfTest::UpdateProfiles(int profile) {
const std::vector<AutofillProfile*>& all_profiles = GetAllProfiles(profile);
std::vector<AutofillProfile> autofill_profiles;
for (size_t i = 0; i < all_profiles.size(); ++i) {
@@ -81,19 +81,19 @@ void PerformanceLiveAutofillSyncTest::UpdateProfiles(int profile) {
SetProfiles(profile, &autofill_profiles);
}
-void PerformanceLiveAutofillSyncTest::RemoveProfiles(int profile) {
+void AutofillSyncPerfTest::RemoveProfiles(int profile) {
std::vector<AutofillProfile> empty;
SetProfiles(profile, &empty);
}
-void PerformanceLiveAutofillSyncTest::Cleanup() {
+void AutofillSyncPerfTest::Cleanup() {
for (int i = 0; i < num_clients(); ++i) {
RemoveProfiles(i);
}
ASSERT_TRUE(AwaitQuiescence());
}
-const AutofillProfile PerformanceLiveAutofillSyncTest::NextAutofillProfile() {
+const AutofillProfile AutofillSyncPerfTest::NextAutofillProfile() {
AutofillProfile profile;
autofill_test::SetProfileInfoWithGuid(&profile, NextGUID().c_str(),
NextName().c_str(), "", "", "", "", "",
@@ -101,29 +101,29 @@ const AutofillProfile PerformanceLiveAutofillSyncTest::NextAutofillProfile() {
return profile;
}
-const std::string PerformanceLiveAutofillSyncTest::NextGUID() {
+const std::string AutofillSyncPerfTest::NextGUID() {
return IntToGUID(guid_number_++);
}
-const std::string PerformanceLiveAutofillSyncTest::IntToGUID(int n) {
+const std::string AutofillSyncPerfTest::IntToGUID(int n) {
return StringPrintf("00000000-0000-0000-0000-%012X", n);
}
-const std::string PerformanceLiveAutofillSyncTest::NextName() {
+const std::string AutofillSyncPerfTest::NextName() {
return IntToName(name_number_++);
}
-const std::string PerformanceLiveAutofillSyncTest::IntToName(int n) {
+const std::string AutofillSyncPerfTest::IntToName(int n) {
return StringPrintf("Name%d" , n);
}
// TCM ID - 7557873.
-IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, Add) {
+IN_PROC_BROWSER_TEST_F(AutofillSyncPerfTest, Add) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
AddProfiles(0, kNumProfiles);
base::TimeDelta dt =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(kNumProfiles, GetProfileCount(0));
ASSERT_TRUE(AllProfilesMatch());
@@ -132,7 +132,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, Add) {
}
// TCM ID - 7549835.
-IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, Update) {
+IN_PROC_BROWSER_TEST_F(AutofillSyncPerfTest, Update) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
AddProfiles(0, kNumProfiles);
@@ -140,7 +140,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, Update) {
UpdateProfiles(0);
base::TimeDelta dt =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(kNumProfiles, GetProfileCount(0));
ASSERT_TRUE(AllProfilesMatch());
@@ -149,7 +149,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, Update) {
}
// TCM ID - 7553678.
-IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, Delete) {
+IN_PROC_BROWSER_TEST_F(AutofillSyncPerfTest, Delete) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
AddProfiles(0, kNumProfiles);
@@ -157,7 +157,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, Delete) {
RemoveProfiles(0);
base::TimeDelta dt =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(0, GetProfileCount(0));
ASSERT_TRUE(AllProfilesMatch());
@@ -165,14 +165,14 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, Delete) {
VLOG(0) << std::endl << "dt: " << dt.InSecondsF() << " s";
}
-IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, DISABLED_Benchmark) {
+IN_PROC_BROWSER_TEST_F(AutofillSyncPerfTest, DISABLED_Benchmark) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
for (int i = 0; i < kNumBenchmarkPoints; ++i) {
int num_profiles = kBenchmarkPoints[i];
AddProfiles(0, num_profiles);
base::TimeDelta dt_add =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_profiles, GetProfileCount(0));
ASSERT_TRUE(AllProfilesMatch());
VLOG(0) << std::endl << "Add: " << num_profiles << " "
@@ -180,7 +180,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, DISABLED_Benchmark) {
UpdateProfiles(0);
base::TimeDelta dt_update =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_profiles, GetProfileCount(0));
ASSERT_TRUE(AllProfilesMatch());
VLOG(0) << std::endl << "Update: " << num_profiles << " "
@@ -188,7 +188,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveAutofillSyncTest, DISABLED_Benchmark) {
RemoveProfiles(0);
base::TimeDelta dt_delete =
- LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(0, GetProfileCount(0));
ASSERT_TRUE(AllProfilesMatch());
VLOG(0) << std::endl << "Delete: " << num_profiles << " "
« no previous file with comments | « chrome/test/live_sync/live_sync_timing_helper.cc ('k') | chrome/test/live_sync/performance/bookmarks_sync_perf_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698