diff options
author | braffert@chromium.org <braffert@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-21 19:58:02 +0000 |
---|---|---|
committer | braffert@chromium.org <braffert@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-21 19:58:02 +0000 |
commit | 307c354b3ca1e481a68ca3820f38eb76712a25ed (patch) | |
tree | d2db57287beae9ce69c537bffc77fc37f1e3194b | |
parent | a91087dc51eac42a3df62615a03a3c5dcb4f21fd (diff) | |
download | chromium_src-307c354b3ca1e481a68ca3820f38eb76712a25ed.zip chromium_src-307c354b3ca1e481a68ca3820f38eb76712a25ed.tar.gz chromium_src-307c354b3ca1e481a68ca3820f38eb76712a25ed.tar.bz2 |
Move sync performance tests into new target
This patch moves all sync performance tests out of sync_integration_tests and
into a new target: sync_performance_tests. Since the performance tests make
use of the existing integration test framework, I have duplicated the
dependencies and conditions in chrome_tests.gypi.
All performance tests as well as the timing helper class have been moved into
live_sync/perf. The class naming convention has been changed as well, but the
tests themselves are unmodified.
The --test-terminate-timeout flag must be used to raise the timout to around 1
minute for all tests to pass. The passwords tests are the culprit here, as
they run significantly slower than the rest of the datatypes. Eventually I
would like to have a SyncPerfTest base class which overrides the default
timeout, but this is not possible with the current inheritance hierarchy.
BUG=89824
TEST=sync_performance_tests
Review URL: http://codereview.chromium.org/7376001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93455 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/chrome_tests.gypi | 116 | ||||
-rw-r--r-- | chrome/test/live_sync/performance/autofill_sync_perf_test.cc (renamed from chrome/test/live_sync/performance_live_autofill_sync_test.cc) | 46 | ||||
-rw-r--r-- | chrome/test/live_sync/performance/bookmarks_sync_perf_test.cc (renamed from chrome/test/live_sync/performance_live_bookmarks_sync_test.cc) | 43 | ||||
-rw-r--r-- | chrome/test/live_sync/performance/extensions_sync_perf_test.cc (renamed from chrome/test/live_sync/performance_live_extensions_sync_test.cc) | 36 | ||||
-rw-r--r-- | chrome/test/live_sync/performance/passwords_sync_perf_test.cc (renamed from chrome/test/live_sync/performance_live_passwords_sync_test.cc) | 40 | ||||
-rw-r--r-- | chrome/test/live_sync/performance/sync_timing_helper.cc (renamed from chrome/test/live_sync/live_sync_timing_helper.cc) | 15 | ||||
-rw-r--r-- | chrome/test/live_sync/performance/sync_timing_helper.h (renamed from chrome/test/live_sync/live_sync_timing_helper.h) | 14 | ||||
-rw-r--r-- | chrome/test/live_sync/performance/typed_urls_sync_perf_test.cc (renamed from chrome/test/live_sync/performance_live_typed_urls_sync_test.cc) | 40 |
8 files changed, 228 insertions, 122 deletions
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 277c0b2..6aee625 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -3498,8 +3498,6 @@ 'test/live_sync/live_sync_extension_helper.h', 'test/live_sync/live_sync_test.cc', 'test/live_sync/live_sync_test.h', - 'test/live_sync/live_sync_timing_helper.cc', - 'test/live_sync/live_sync_timing_helper.h', 'test/live_sync/many_client_live_bookmarks_sync_test.cc', 'test/live_sync/many_client_live_passwords_sync_test.cc', 'test/live_sync/many_client_live_preferences_sync_test.cc', @@ -3509,11 +3507,6 @@ 'test/live_sync/multiple_client_live_preferences_sync_test.cc', 'test/live_sync/multiple_client_live_sessions_sync_test.cc', 'test/live_sync/multiple_client_live_typed_urls_sync_test.cc', - 'test/live_sync/performance_live_autofill_sync_test.cc', - 'test/live_sync/performance_live_bookmarks_sync_test.cc', - 'test/live_sync/performance_live_extensions_sync_test.cc', - 'test/live_sync/performance_live_passwords_sync_test.cc', - 'test/live_sync/performance_live_typed_urls_sync_test.cc', 'test/live_sync/single_client_live_apps_sync_test.cc', 'test/live_sync/single_client_live_bookmarks_sync_test.cc', 'test/live_sync/single_client_live_extensions_sync_test.cc', @@ -3604,6 +3597,115 @@ ], }, { + 'target_name': 'sync_performance_tests', + 'type': 'executable', + 'dependencies': [ + 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'chrome', + 'test_support_common', + '../skia/skia.gyp:skia', + '../testing/gmock.gyp:gmock', + '../testing/gtest.gyp:gtest', + ], + 'include_dirs': [ + '..', + '<(INTERMEDIATE_DIR)', + '<(protoc_out_dir)', + ], + 'defines': [ 'HAS_OUT_OF_PROC_TEST_RUNNER' ], + 'sources': [ + 'browser/password_manager/password_form_data.cc', + 'test/out_of_proc_test_runner.cc', + 'test/live_sync/bookmark_model_verifier.cc', + 'test/live_sync/bookmark_model_verifier.h', + 'test/live_sync/live_autofill_sync_test.cc', + 'test/live_sync/live_autofill_sync_test.h', + 'test/live_sync/live_bookmarks_sync_test.cc', + 'test/live_sync/live_bookmarks_sync_test.h', + 'test/live_sync/live_extensions_sync_test.cc', + 'test/live_sync/live_extensions_sync_test.h', + 'test/live_sync/live_passwords_sync_test.cc', + 'test/live_sync/live_passwords_sync_test.h', + 'test/live_sync/live_typed_urls_sync_test.cc', + 'test/live_sync/live_typed_urls_sync_test.h', + 'test/live_sync/live_sync_extension_helper.cc', + 'test/live_sync/live_sync_extension_helper.h', + 'test/live_sync/live_sync_test.cc', + 'test/live_sync/live_sync_test.h', + 'test/live_sync/performance/autofill_sync_perf_test.cc', + 'test/live_sync/performance/bookmarks_sync_perf_test.cc', + 'test/live_sync/performance/extensions_sync_perf_test.cc', + 'test/live_sync/performance/sync_timing_helper.cc', + 'test/live_sync/performance/sync_timing_helper.h', + 'test/live_sync/performance/passwords_sync_perf_test.cc', + 'test/live_sync/performance/typed_urls_sync_perf_test.cc', + ], + 'conditions': [ + ['toolkit_uses_gtk == 1', { + 'dependencies': [ + '../build/linux/system.gyp:gtk', + '../build/linux/system.gyp:ssl', + ], + }], + ['OS=="mac"', { + # See the comment in this section of the unit_tests target for an + # explanation (crbug.com/43791 - libwebcore.a is too large to mmap). + 'dependencies+++': [ + '../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', + ], + # The sync_integration_tests do not run on mac without this flag. + # Search for comments about "xcode_settings" elsewhere in this file. + 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, + }], + ['OS=="win"', { + 'sources': [ + '<(SHARED_INTERMEDIATE_DIR)/chrome/autofill_resources.rc', + '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc', + '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc', + '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources.rc', + '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources_standard.rc', + '<(SHARED_INTERMEDIATE_DIR)/chrome_dll_version/chrome_dll_version.rc', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc', + ], + 'include_dirs': [ + '<(DEPTH)/third_party/wtl/include', + ], + 'dependencies': [ + 'chrome_dll_version', + 'installer_util_strings', + '../sandbox/sandbox.gyp:sandbox', + ], + 'conditions': [ + ['win_use_allocator_shim==1', { + 'dependencies': [ + '<(allocator_target)', + ], + }], + ], + 'configurations': { + 'Debug': { + 'msvs_settings': { + 'VCLinkerTool': { + 'LinkIncremental': '<(msvs_debug_link_nonincremental)', + }, + }, + }, + }, + }, { # else: OS != "win" + 'sources!': [ + 'app/chrome_dll.rc', + 'app/chrome_dll_version.rc.version', + 'test/data/resource.rc', + ], + }], + ['toolkit_views==1', { + 'dependencies': [ + '../views/views.gyp:views', + ], + }], + ], + }, + { # Executable that contains all the tests to be run on the GPU bots. 'target_name': 'gpu_tests', 'type': 'executable', diff --git a/chrome/test/live_sync/performance_live_autofill_sync_test.cc b/chrome/test/live_sync/performance/autofill_sync_perf_test.cc index 456d32b..a7a18c60 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 << " " diff --git a/chrome/test/live_sync/performance_live_bookmarks_sync_test.cc b/chrome/test/live_sync/performance/bookmarks_sync_perf_test.cc index e15ee11..a040aec 100644 --- a/chrome/test/live_sync/performance_live_bookmarks_sync_test.cc +++ b/chrome/test/live_sync/performance/bookmarks_sync_perf_test.cc @@ -4,7 +4,7 @@ #include "chrome/browser/sync/profile_sync_service_harness.h" #include "chrome/test/live_sync/live_bookmarks_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 kNumBookmarks = 150; @@ -16,10 +16,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 PerformanceLiveBookmarksSyncTest +class BookmarksSyncPerfTest : public TwoClientLiveBookmarksSyncTest { public: - PerformanceLiveBookmarksSyncTest() : url_number(0), url_title_number(0) {} + BookmarksSyncPerfTest() : url_number(0), url_title_number(0) {} // Adds |num_urls| new unique bookmarks to the bookmark bar for |profile|. void AddURLs(int profile, int num_urls); @@ -43,29 +43,30 @@ class PerformanceLiveBookmarksSyncTest int url_number; int url_title_number; - DISALLOW_COPY_AND_ASSIGN(PerformanceLiveBookmarksSyncTest); + DISALLOW_COPY_AND_ASSIGN(BookmarksSyncPerfTest); }; -void PerformanceLiveBookmarksSyncTest::AddURLs(int profile, int num_urls) { +void BookmarksSyncPerfTest::AddURLs(int profile, int num_urls) { for (int i = 0; i < num_urls; ++i) { ASSERT_TRUE(AddURL( profile, 0, NextIndexedURLTitle(), GURL(NextIndexedURL())) != NULL); } } -void PerformanceLiveBookmarksSyncTest::UpdateURLs(int profile) { +void BookmarksSyncPerfTest::UpdateURLs(int profile) { for (int i = 0; i < GetBookmarkBarNode(profile)->child_count(); ++i) { ASSERT_TRUE(SetURL(profile, GetBookmarkBarNode(profile)->GetChild(i), GURL(NextIndexedURL()))); } } -void PerformanceLiveBookmarksSyncTest::RemoveURLs(int profile) { - while (!GetBookmarkBarNode(profile)->empty()) +void BookmarksSyncPerfTest::RemoveURLs(int profile) { + while (GetBookmarkBarNode(profile)->child_count()) { Remove(profile, GetBookmarkBarNode(profile), 0); + } } -void PerformanceLiveBookmarksSyncTest::Cleanup() { +void BookmarksSyncPerfTest::Cleanup() { for (int i = 0; i < num_clients(); ++i) { RemoveURLs(i); } @@ -74,22 +75,22 @@ void PerformanceLiveBookmarksSyncTest::Cleanup() { ASSERT_TRUE(AllModelsMatch()); } -std::string PerformanceLiveBookmarksSyncTest::NextIndexedURL() { +std::string BookmarksSyncPerfTest::NextIndexedURL() { return IndexedURL(url_number++); } -std::wstring PerformanceLiveBookmarksSyncTest::NextIndexedURLTitle() { +std::wstring BookmarksSyncPerfTest::NextIndexedURLTitle() { return IndexedURLTitle(url_title_number++); } // TCM ID - 7556828. -IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, Add) { +IN_PROC_BROWSER_TEST_F(BookmarksSyncPerfTest, Add) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; DisableVerifier(); AddURLs(0, kNumBookmarks); base::TimeDelta dt = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(kNumBookmarks, GetBookmarkBarNode(0)->child_count()); ASSERT_TRUE(AllModelsMatch()); @@ -98,7 +99,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, Add) { } // TCM ID - 7564762. -IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, Update) { +IN_PROC_BROWSER_TEST_F(BookmarksSyncPerfTest, Update) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; DisableVerifier(); @@ -107,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, Update) { UpdateURLs(0); base::TimeDelta dt = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(kNumBookmarks, GetBookmarkBarNode(0)->child_count()); ASSERT_TRUE(AllModelsMatch()); @@ -116,7 +117,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, Update) { } // TCM ID - 7566626. -IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, Delete) { +IN_PROC_BROWSER_TEST_F(BookmarksSyncPerfTest, Delete) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; DisableVerifier(); @@ -125,7 +126,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, Delete) { RemoveURLs(0); base::TimeDelta dt = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(0, GetBookmarkBarNode(0)->child_count()); ASSERT_TRUE(AllModelsMatch()); @@ -133,7 +134,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, Delete) { VLOG(0) << std::endl << "dt: " << dt.InSecondsF() << " s"; } -IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, DISABLED_Benchmark) { +IN_PROC_BROWSER_TEST_F(BookmarksSyncPerfTest, DISABLED_Benchmark) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; DisableVerifier(); @@ -141,7 +142,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, DISABLED_Benchmark) { int num_bookmarks = kBenchmarkPoints[i]; AddURLs(0, num_bookmarks); base::TimeDelta dt_add = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(num_bookmarks, GetBookmarkBarNode(0)->child_count()); ASSERT_TRUE(AllModelsMatch()); VLOG(0) << std::endl << "Add: " << num_bookmarks << " " @@ -149,7 +150,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, DISABLED_Benchmark) { UpdateURLs(0); base::TimeDelta dt_update = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(num_bookmarks, GetBookmarkBarNode(0)->child_count()); ASSERT_TRUE(AllModelsMatch()); VLOG(0) << std::endl << "Update: " << num_bookmarks << " " @@ -157,7 +158,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveBookmarksSyncTest, DISABLED_Benchmark) { RemoveURLs(0); base::TimeDelta dt_delete = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(0, GetBookmarkBarNode(0)->child_count()); ASSERT_TRUE(AllModelsMatch()); VLOG(0) << std::endl << "Delete: " << num_bookmarks << " " diff --git a/chrome/test/live_sync/performance_live_extensions_sync_test.cc b/chrome/test/live_sync/performance/extensions_sync_perf_test.cc index 5bb1e24..f66f107 100644 --- a/chrome/test/live_sync/performance_live_extensions_sync_test.cc +++ b/chrome/test/live_sync/performance/extensions_sync_perf_test.cc @@ -5,7 +5,7 @@ #include "base/stringprintf.h" #include "chrome/browser/sync/profile_sync_service_harness.h" #include "chrome/test/live_sync/live_extensions_sync_test.h" -#include "chrome/test/live_sync/live_sync_timing_helper.h" +#include "chrome/test/live_sync/performance/sync_timing_helper.h" // TODO(braffert): Replicate these tests for apps. @@ -19,10 +19,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 PerformanceLiveExtensionsSyncTest +class ExtensionsSyncPerfTest : public TwoClientLiveExtensionsSyncTest { public: - PerformanceLiveExtensionsSyncTest() : extension_number_(0) {} + ExtensionsSyncPerfTest() : extension_number_(0) {} // Adds |num_extensions| new unique extensions to |profile|. void AddExtensions(int profile, int num_extensions); @@ -39,17 +39,17 @@ class PerformanceLiveExtensionsSyncTest private: int extension_number_; - DISALLOW_COPY_AND_ASSIGN(PerformanceLiveExtensionsSyncTest); + DISALLOW_COPY_AND_ASSIGN(ExtensionsSyncPerfTest); }; -void PerformanceLiveExtensionsSyncTest::AddExtensions(int profile, +void ExtensionsSyncPerfTest::AddExtensions(int profile, int num_extensions) { for (int i = 0; i < num_extensions; ++i) { InstallExtension(GetProfile(profile), extension_number_++); } } -void PerformanceLiveExtensionsSyncTest::UpdateExtensions(int profile) { +void ExtensionsSyncPerfTest::UpdateExtensions(int profile) { std::vector<int> extensions = GetInstalledExtensions(GetProfile(profile)); for (std::vector<int>::iterator it = extensions.begin(); it != extensions.end(); ++it) { @@ -61,7 +61,7 @@ void PerformanceLiveExtensionsSyncTest::UpdateExtensions(int profile) { } } -void PerformanceLiveExtensionsSyncTest::RemoveExtensions(int profile) { +void ExtensionsSyncPerfTest::RemoveExtensions(int profile) { std::vector<int> extensions = GetInstalledExtensions(GetProfile(profile)); for (std::vector<int>::iterator it = extensions.begin(); it != extensions.end(); ++it) { @@ -69,7 +69,7 @@ void PerformanceLiveExtensionsSyncTest::RemoveExtensions(int profile) { } } -void PerformanceLiveExtensionsSyncTest::Cleanup() { +void ExtensionsSyncPerfTest::Cleanup() { for (int i = 0; i < num_clients(); ++i) { RemoveExtensions(i); } @@ -78,12 +78,12 @@ void PerformanceLiveExtensionsSyncTest::Cleanup() { } // TCM ID - 7563874. -IN_PROC_BROWSER_TEST_F(PerformanceLiveExtensionsSyncTest, Add) { +IN_PROC_BROWSER_TEST_F(ExtensionsSyncPerfTest, Add) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; AddExtensions(0, kNumExtensions); base::TimeDelta dt = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); InstallExtensionsPendingForSync(GetProfile(1)); ASSERT_TRUE(AllProfilesHaveSameExtensions()); @@ -92,7 +92,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveExtensionsSyncTest, Add) { } // TCM ID - 7655397. -IN_PROC_BROWSER_TEST_F(PerformanceLiveExtensionsSyncTest, Update) { +IN_PROC_BROWSER_TEST_F(ExtensionsSyncPerfTest, Update) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; AddExtensions(0, kNumExtensions); @@ -101,7 +101,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveExtensionsSyncTest, Update) { UpdateExtensions(0); base::TimeDelta dt = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_TRUE(AllProfilesHaveSameExtensions()); // TODO(braffert): Compare timings against some target value. @@ -109,7 +109,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveExtensionsSyncTest, Update) { } // TCM ID - 7567721. -IN_PROC_BROWSER_TEST_F(PerformanceLiveExtensionsSyncTest, Delete) { +IN_PROC_BROWSER_TEST_F(ExtensionsSyncPerfTest, Delete) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; AddExtensions(0, kNumExtensions); @@ -118,34 +118,34 @@ IN_PROC_BROWSER_TEST_F(PerformanceLiveExtensionsSyncTest, Delete) { RemoveExtensions(0); base::TimeDelta dt = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_TRUE(AllProfilesHaveSameExtensions()); // TODO(braffert): Compare timings against some target value. VLOG(0) << std::endl << "dt: " << dt.InSecondsF() << " s"; } -IN_PROC_BROWSER_TEST_F(PerformanceLiveExtensionsSyncTest, DISABLED_Benchmark) { +IN_PROC_BROWSER_TEST_F(ExtensionsSyncPerfTest, DISABLED_Benchmark) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; for (int i = 0; i < kNumBenchmarkPoints; ++i) { int num_extensions = kBenchmarkPoints[i]; AddExtensions(0, num_extensions); base::TimeDelta dt_add = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); InstallExtensionsPendingForSync(GetProfile(1)); VLOG(0) << std::endl << "Add: " << num_extensions << " " << dt_add.InSecondsF(); UpdateExtensions(0); base::TimeDelta dt_update = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); VLOG(0) << std::endl << "Update: " << num_extensions << " " << dt_update.InSecondsF(); RemoveExtensions(0); base::TimeDelta dt_delete = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); VLOG(0) << std::endl << "Delete: " << num_extensions << " " << dt_delete.InSecondsF(); diff --git a/chrome/test/live_sync/performance_live_passwords_sync_test.cc b/chrome/test/live_sync/performance/passwords_sync_perf_test.cc index 05aae47..27b8aa6 100644 --- a/chrome/test/live_sync/performance_live_passwords_sync_test.cc +++ b/chrome/test/live_sync/performance/passwords_sync_perf_test.cc @@ -6,7 +6,7 @@ #include "chrome/browser/password_manager/password_store.h" #include "chrome/browser/sync/profile_sync_service_harness.h" #include "chrome/test/live_sync/live_passwords_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 kNumPasswords = 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 PerformanceLivePasswordsSyncTest +class PasswordsSyncPerfTest : public TwoClientLivePasswordsSyncTest { public: - PerformanceLivePasswordsSyncTest() : password_number_(0) {} + PasswordsSyncPerfTest() : password_number_(0) {} // Adds |num_logins| new unique passwords to |profile|. void AddLogins(int profile, int num_logins); @@ -43,16 +43,16 @@ class PerformanceLivePasswordsSyncTest std::string NextPassword(); int password_number_; - DISALLOW_COPY_AND_ASSIGN(PerformanceLivePasswordsSyncTest); + DISALLOW_COPY_AND_ASSIGN(PasswordsSyncPerfTest); }; -void PerformanceLivePasswordsSyncTest::AddLogins(int profile, int num_logins) { +void PasswordsSyncPerfTest::AddLogins(int profile, int num_logins) { for (int i = 0; i < num_logins; ++i) { AddLogin(GetPasswordStore(profile), NextLogin()); } } -void PerformanceLivePasswordsSyncTest::UpdateLogins(int profile) { +void PasswordsSyncPerfTest::UpdateLogins(int profile) { std::vector<webkit_glue::PasswordForm> logins; GetLogins(GetPasswordStore(profile), logins); for (std::vector<webkit_glue::PasswordForm>::iterator it = logins.begin(); @@ -62,11 +62,11 @@ void PerformanceLivePasswordsSyncTest::UpdateLogins(int profile) { } } -void PerformanceLivePasswordsSyncTest::RemoveLogins(int profile) { +void PasswordsSyncPerfTest::RemoveLogins(int profile) { LivePasswordsSyncTest::RemoveLogins(GetPasswordStore(profile)); } -void PerformanceLivePasswordsSyncTest::Cleanup() { +void PasswordsSyncPerfTest::Cleanup() { for (int i = 0; i < num_clients(); ++i) { RemoveLogins(i); } @@ -75,21 +75,21 @@ void PerformanceLivePasswordsSyncTest::Cleanup() { ASSERT_TRUE(AllProfilesContainSamePasswordForms()); } -webkit_glue::PasswordForm PerformanceLivePasswordsSyncTest::NextLogin() { +webkit_glue::PasswordForm PasswordsSyncPerfTest::NextLogin() { return CreateTestPasswordForm(password_number_++); } -std::string PerformanceLivePasswordsSyncTest::NextPassword() { +std::string PasswordsSyncPerfTest::NextPassword() { return base::StringPrintf("password%d", password_number_++); } // TCM ID - 7567749. -IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Add) { +IN_PROC_BROWSER_TEST_F(PasswordsSyncPerfTest, Add) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; AddLogins(0, kNumPasswords); base::TimeDelta dt = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(kNumPasswords, GetPasswordCount(0)); ASSERT_TRUE(AllProfilesContainSamePasswordForms()); @@ -98,7 +98,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Add) { } // TCM ID - 7365093. -IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Update) { +IN_PROC_BROWSER_TEST_F(PasswordsSyncPerfTest, Update) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; AddLogins(0, kNumPasswords); @@ -106,7 +106,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Update) { UpdateLogins(0); base::TimeDelta dt = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(kNumPasswords, GetPasswordCount(0)); ASSERT_TRUE(AllProfilesContainSamePasswordForms()); @@ -115,7 +115,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Update) { } // TCM ID - 7557852. -IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Delete) { +IN_PROC_BROWSER_TEST_F(PasswordsSyncPerfTest, Delete) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; AddLogins(0, kNumPasswords); @@ -123,7 +123,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Delete) { RemoveLogins(0); base::TimeDelta dt = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(0, GetPasswordCount(0)); ASSERT_TRUE(AllProfilesContainSamePasswordForms()); @@ -131,14 +131,14 @@ IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, Delete) { VLOG(0) << std::endl << "dt: " << dt.InSecondsF() << " s"; } -IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, DISABLED_Benchmark) { +IN_PROC_BROWSER_TEST_F(PasswordsSyncPerfTest, DISABLED_Benchmark) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; for (int i = 0; i < kNumBenchmarkPoints; ++i) { int num_passwords = kBenchmarkPoints[i]; AddLogins(0, num_passwords); base::TimeDelta dt_add = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(num_passwords, GetPasswordCount(0)); ASSERT_TRUE(AllProfilesContainSamePasswordForms()); VLOG(0) << std::endl << "Add: " << num_passwords << " " @@ -146,7 +146,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, DISABLED_Benchmark) { UpdateLogins(0); base::TimeDelta dt_update = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(num_passwords, GetPasswordCount(0)); ASSERT_TRUE(AllProfilesContainSamePasswordForms()); VLOG(0) << std::endl << "Update: " << num_passwords << " " @@ -154,7 +154,7 @@ IN_PROC_BROWSER_TEST_F(PerformanceLivePasswordsSyncTest, DISABLED_Benchmark) { RemoveLogins(0); base::TimeDelta dt_delete = - LiveSyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); + SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); ASSERT_EQ(0, GetPasswordCount(0)); ASSERT_TRUE(AllProfilesContainSamePasswordForms()); VLOG(0) << std::endl << "Delete: " << num_passwords << " " diff --git a/chrome/test/live_sync/live_sync_timing_helper.cc b/chrome/test/live_sync/performance/sync_timing_helper.cc index d910c99..0595896 100644 --- a/chrome/test/live_sync/live_sync_timing_helper.cc +++ b/chrome/test/live_sync/performance/sync_timing_helper.cc @@ -2,31 +2,34 @@ // 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 "chrome/test/live_sync/performance/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() {} +SyncTimingHelper::SyncTimingHelper() {} -LiveSyncTimingHelper::~LiveSyncTimingHelper() {} +SyncTimingHelper::~SyncTimingHelper() {} -base::TimeDelta LiveSyncTimingHelper::TimeSyncCycle( +// static +base::TimeDelta SyncTimingHelper::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( +// static +base::TimeDelta SyncTimingHelper::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( +// static +base::TimeDelta SyncTimingHelper::TimeUntilQuiescence( std::vector<ProfileSyncServiceHarness*>& clients) { base::Time start = base::Time::Now(); EXPECT_TRUE(ProfileSyncServiceHarness::AwaitQuiescence(clients)); diff --git a/chrome/test/live_sync/live_sync_timing_helper.h b/chrome/test/live_sync/performance/sync_timing_helper.h index 4f43971..c45b367 100644 --- a/chrome/test/live_sync/live_sync_timing_helper.h +++ b/chrome/test/live_sync/performance/sync_timing_helper.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TIMING_HELPER_H_ -#define CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TIMING_HELPER_H_ +#ifndef CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_ +#define CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_ #pragma once #include "base/basictypes.h" @@ -16,10 +16,10 @@ class TimeDelta; class ProfileSyncServiceHarness; -class LiveSyncTimingHelper { +class SyncTimingHelper { public: - LiveSyncTimingHelper(); - ~LiveSyncTimingHelper(); + SyncTimingHelper(); + ~SyncTimingHelper(); // Returns the time taken for |client| to complete a single sync cycle. static base::TimeDelta TimeSyncCycle(ProfileSyncServiceHarness* client); @@ -35,7 +35,7 @@ class LiveSyncTimingHelper { std::vector<ProfileSyncServiceHarness*>& clients); private: - DISALLOW_COPY_AND_ASSIGN(LiveSyncTimingHelper); + DISALLOW_COPY_AND_ASSIGN(SyncTimingHelper); }; -#endif // CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TIMING_HELPER_H_ +#endif // CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_ 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 index c4b3ce6c8..6e910a9 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 << " " |