Chromium Code Reviews| Index: chrome/test/live_sync/perf/autofill_sync_perf_test.cc |
| diff --git a/chrome/test/live_sync/performance_live_autofill_sync_test.cc b/chrome/test/live_sync/perf/autofill_sync_perf_test.cc |
| similarity index 84% |
| rename from chrome/test/live_sync/performance_live_autofill_sync_test.cc |
| rename to chrome/test/live_sync/perf/autofill_sync_perf_test.cc |
| index 456d32b2db6e01ec58df0b8693f60e5b13e156dc..6adb908a1ebdb59de66b2a1861dfa7c409eb7cd4 100644 |
| --- a/chrome/test/live_sync/performance_live_autofill_sync_test.cc |
| +++ b/chrome/test/live_sync/perf/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/perf/live_sync_timing_helper.h" |
|
Raghu Simha
2011/07/15 07:54:28
"perf" -> "performance" (let's leave no room for a
braffert
2011/07/15 21:37:41
Done.
|
| 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,24 +101,24 @@ 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); |
| @@ -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); |
| @@ -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); |
| @@ -165,7 +165,7 @@ 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) { |