Commit 36a787fb authored by braffert@chromium.org's avatar braffert@chromium.org

Sync performance test: Remove disabled benchmark tests.

Currently each datatype included in the sync performance tests contains a disabled test
which was intended to be run offline to observe how the performance scales according to
the number of entries synced.  We are not planning on enabling these tests, because
they were never intended to be automated in the first place, so they should not be
included at all.

BUG=none
TEST=sync_performance_tests

Review URL: http://codereview.chromium.org/7491062

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96441 0039d316-1c4b-4281-b951-d872f2087c98
parent 0b4e2232
......@@ -20,14 +20,8 @@ using autofill_helper::GetProfileCount;
using autofill_helper::RemoveKey;
using autofill_helper::SetProfiles;
// TODO(braffert): Move kNumBenchmarkPoints and kBenchmarkPoints for all
// datatypes into a performance test base class, once it is possible to do so.
static const int kNumKeys = 150;
static const int kNumProfiles = 150;
static const int kNumBenchmarkPoints = 18;
static const int kBenchmarkPoints[] = {1, 10, 20, 30, 40, 50, 75, 100, 125,
150, 175, 200, 225, 250, 300, 350, 400,
500};
class AutofillSyncPerfTest : public LiveSyncTest {
public:
......@@ -52,10 +46,6 @@ class AutofillSyncPerfTest : public LiveSyncTest {
// Removes all autofill keys from |profile|.
void RemoveKeys(int profile);
// Removes all autofill profiles in all sync profiles. Called between
// benchmark iterations.
void Cleanup();
private:
// Returns a new unique autofill profile.
const AutofillProfile NextAutofillProfile();
......@@ -133,13 +123,6 @@ void AutofillSyncPerfTest::RemoveKeys(int profile) {
}
}
void AutofillSyncPerfTest::Cleanup() {
for (int i = 0; i < num_clients(); ++i) {
RemoveProfiles(i);
}
ASSERT_TRUE(AwaitQuiescence());
}
const AutofillProfile AutofillSyncPerfTest::NextAutofillProfile() {
AutofillProfile profile;
autofill_test::SetProfileInfoWithGuid(&profile, NextGUID().c_str(),
......@@ -213,36 +196,3 @@ IN_PROC_BROWSER_TEST_F(AutofillSyncPerfTest, Autofill_P0) {
ASSERT_EQ(0, GetKeyCount(1));
SyncTimingHelper::PrintResult("autofill", "delete_autofill_keys", dt);
}
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 =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_profiles, GetProfileCount(0));
ASSERT_TRUE(AllProfilesMatch());
VLOG(0) << std::endl << "Add: " << num_profiles << " "
<< dt_add.InSecondsF();
UpdateProfiles(0);
base::TimeDelta dt_update =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_profiles, GetProfileCount(0));
ASSERT_TRUE(AllProfilesMatch());
VLOG(0) << std::endl << "Update: " << num_profiles << " "
<< dt_update.InSecondsF();
RemoveProfiles(0);
base::TimeDelta dt_delete =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(0, GetProfileCount(0));
ASSERT_TRUE(AllProfilesMatch());
VLOG(0) << std::endl << "Delete: " << num_profiles << " "
<< dt_delete.InSecondsF();
Cleanup();
}
}
......@@ -15,13 +15,7 @@ using bookmarks_helper::IndexedURLTitle;
using bookmarks_helper::Remove;
using bookmarks_helper::SetURL;
// TODO(braffert): Move kNumBenchmarkPoints and kBenchmarkPoints for all
// datatypes into a performance test base class, once it is possible to do so.
static const int kNumBookmarks = 150;
static const int kNumBenchmarkPoints = 18;
static const int kBenchmarkPoints[] = {1, 10, 20, 30, 40, 50, 75, 100, 125,
150, 175, 200, 225, 250, 300, 350, 400,
500};
class BookmarksSyncPerfTest : public LiveSyncTest {
public:
......@@ -42,10 +36,6 @@ class BookmarksSyncPerfTest : public LiveSyncTest {
// Returns the number of bookmarks stored in the bookmark bar for |profile|.
int GetURLCount(int profile);
// Remvoes all bookmarks in the bookmark bars for all profiles. Called
// between benchmark iterations.
void Cleanup();
private:
// Returns a new unique bookmark URL.
std::string NextIndexedURL();
......@@ -85,15 +75,6 @@ int BookmarksSyncPerfTest::GetURLCount(int profile) {
return GetBookmarkBarNode(profile)->child_count();
}
void BookmarksSyncPerfTest::Cleanup() {
for (int i = 0; i < num_clients(); ++i) {
RemoveURLs(i);
}
ASSERT_TRUE(AwaitQuiescence());
ASSERT_EQ(0, GetBookmarkBarNode(0)->child_count());
ASSERT_TRUE(AllModelsMatch());
}
std::string BookmarksSyncPerfTest::NextIndexedURL() {
return IndexedURL(url_number_++);
}
......@@ -124,37 +105,3 @@ IN_PROC_BROWSER_TEST_F(BookmarksSyncPerfTest, P0) {
ASSERT_EQ(0, GetURLCount(1));
SyncTimingHelper::PrintResult("bookmarks", "delete_bookmarks", dt);
}
IN_PROC_BROWSER_TEST_F(BookmarksSyncPerfTest, DISABLED_Benchmark) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
DisableVerifier();
for (int i = 0; i < kNumBenchmarkPoints; ++i) {
int num_bookmarks = kBenchmarkPoints[i];
AddURLs(0, num_bookmarks);
base::TimeDelta dt_add =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_bookmarks, GetBookmarkBarNode(0)->child_count());
ASSERT_TRUE(AllModelsMatch());
VLOG(0) << std::endl << "Add: " << num_bookmarks << " "
<< dt_add.InSecondsF();
UpdateURLs(0);
base::TimeDelta dt_update =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_bookmarks, GetBookmarkBarNode(0)->child_count());
ASSERT_TRUE(AllModelsMatch());
VLOG(0) << std::endl << "Update: " << num_bookmarks << " "
<< dt_update.InSecondsF();
RemoveURLs(0);
base::TimeDelta dt_delete =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(0, GetBookmarkBarNode(0)->child_count());
ASSERT_TRUE(AllModelsMatch());
VLOG(0) << std::endl << "Delete: " << num_bookmarks << " "
<< dt_delete.InSecondsF();
Cleanup();
}
}
......@@ -20,13 +20,7 @@ using extensions_helper::UninstallExtension;
// TODO(braffert): Replicate these tests for apps.
// TODO(braffert): Move kNumBenchmarkPoints and kBenchmarkPoints for all
// datatypes into a performance test base class, once it is possible to do so.
static const int kNumExtensions = 150;
static const int kNumBenchmarkPoints = 18;
static const int kBenchmarkPoints[] = {1, 10, 20, 30, 40, 50, 75, 100, 125,
150, 175, 200, 225, 250, 300, 350, 400,
500};
class ExtensionsSyncPerfTest : public LiveSyncTest {
public:
......@@ -46,10 +40,6 @@ class ExtensionsSyncPerfTest : public LiveSyncTest {
// Returns the number of currently installed extensions for |profile|.
int GetExtensionCount(int profile);
// Uninstalls all extensions from all profiles. Called between benchmark
// iterations.
void Cleanup();
private:
int extension_number_;
DISALLOW_COPY_AND_ASSIGN(ExtensionsSyncPerfTest);
......@@ -85,14 +75,6 @@ void ExtensionsSyncPerfTest::RemoveExtensions(int profile) {
}
}
void ExtensionsSyncPerfTest::Cleanup() {
for (int i = 0; i < num_clients(); ++i) {
RemoveExtensions(i);
}
ASSERT_TRUE(AwaitQuiescence());
ASSERT_TRUE(AllProfilesHaveSameExtensions());
}
IN_PROC_BROWSER_TEST_F(ExtensionsSyncPerfTest, P0) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
int num_default_extensions = GetExtensionCount(0);
......@@ -118,31 +100,3 @@ IN_PROC_BROWSER_TEST_F(ExtensionsSyncPerfTest, P0) {
ASSERT_EQ(num_default_extensions, GetExtensionCount(1));
SyncTimingHelper::PrintResult("extensions", "delete_extensions", dt);
}
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 =
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 =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
VLOG(0) << std::endl << "Update: " << num_extensions << " "
<< dt_update.InSecondsF();
RemoveExtensions(0);
base::TimeDelta dt_delete =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
VLOG(0) << std::endl << "Delete: " << num_extensions << " "
<< dt_delete.InSecondsF();
Cleanup();
}
}
......@@ -9,13 +9,7 @@
#include "chrome/test/live_sync/live_passwords_sync_test.h"
#include "chrome/test/live_sync/performance/sync_timing_helper.h"
// TODO(braffert): Move kNumBenchmarkPoints and kBenchmarkPoints for all
// datatypes into a performance test base class, once it is possible to do so.
static const int kNumPasswords = 150;
static const int kNumBenchmarkPoints = 18;
static const int kBenchmarkPoints[] = {1, 10, 20, 30, 40, 50, 75, 100, 125,
150, 175, 200, 225, 250, 300, 350, 400,
500};
class PasswordsSyncPerfTest : public TwoClientLivePasswordsSyncTest {
public:
......@@ -30,9 +24,6 @@ class PasswordsSyncPerfTest : public TwoClientLivePasswordsSyncTest {
// Removes all logins for |profile|.
void RemoveLogins(int profile);
// Removes all logins for all profiles. Called between benchmark iterations.
void Cleanup();
private:
// Returns a new unique login.
webkit_glue::PasswordForm NextLogin();
......@@ -64,15 +55,6 @@ void PasswordsSyncPerfTest::RemoveLogins(int profile) {
LivePasswordsSyncTest::RemoveLogins(GetPasswordStore(profile));
}
void PasswordsSyncPerfTest::Cleanup() {
for (int i = 0; i < num_clients(); ++i) {
RemoveLogins(i);
}
ASSERT_TRUE(AwaitQuiescence());
ASSERT_EQ(0, GetPasswordCount(0));
ASSERT_TRUE(AllProfilesContainSamePasswordForms());
}
webkit_glue::PasswordForm PasswordsSyncPerfTest::NextLogin() {
return CreateTestPasswordForm(password_number_++);
}
......@@ -103,36 +85,3 @@ IN_PROC_BROWSER_TEST_F(PasswordsSyncPerfTest, P0) {
ASSERT_EQ(0, GetPasswordCount(1));
SyncTimingHelper::PrintResult("passwords", "delete_passwords", dt);
}
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 =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_passwords, GetPasswordCount(0));
ASSERT_TRUE(AllProfilesContainSamePasswordForms());
VLOG(0) << std::endl << "Add: " << num_passwords << " "
<< dt_add.InSecondsF();
UpdateLogins(0);
base::TimeDelta dt_update =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_passwords, GetPasswordCount(0));
ASSERT_TRUE(AllProfilesContainSamePasswordForms());
VLOG(0) << std::endl << "Update: " << num_passwords << " "
<< dt_update.InSecondsF();
RemoveLogins(0);
base::TimeDelta dt_delete =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(0, GetPasswordCount(0));
ASSERT_TRUE(AllProfilesContainSamePasswordForms());
VLOG(0) << std::endl << "Delete: " << num_passwords << " "
<< dt_delete.InSecondsF();
Cleanup();
}
}
......@@ -13,13 +13,7 @@ using typed_urls_helper::AssertAllProfilesHaveSameURLsAsVerifier;
using typed_urls_helper::DeleteUrlFromHistory;
using typed_urls_helper::GetTypedUrlsFromClient;
// TODO(braffert): Move kNumBenchmarkPoints and kBenchmarkPoints for all
// datatypes into a performance test base class, once it is possible to do so.
static const int kNumUrls = 150;
static const size_t kNumBenchmarkPoints = 18;
static const size_t kBenchmarkPoints[] = {1, 10, 20, 30, 40, 50, 75, 100, 125,
150, 175, 200, 225, 250, 300, 350,
400, 500};
class TypedUrlsSyncPerfTest : public LiveSyncTest {
public:
......@@ -39,10 +33,6 @@ class TypedUrlsSyncPerfTest : public LiveSyncTest {
// Returns the number of typed urls stored in |profile|.
int GetURLCount(int profile);
// Removes all typed urls for all profiles. Called between benchmark
// iterations.
void Cleanup();
private:
// Returns a new unique typed URL.
GURL NextURL();
......@@ -80,15 +70,6 @@ int TypedUrlsSyncPerfTest::GetURLCount(int profile) {
return GetTypedUrlsFromClient(profile).size();
}
void TypedUrlsSyncPerfTest::Cleanup() {
for (int i = 0; i < num_clients(); ++i) {
RemoveURLs(i);
}
ASSERT_TRUE(AwaitQuiescence());
ASSERT_EQ(0U, GetTypedUrlsFromClient(0).size());
AssertAllProfilesHaveSameURLsAsVerifier();
}
GURL TypedUrlsSyncPerfTest::NextURL() {
return IntToURL(url_number_++);
}
......@@ -119,35 +100,3 @@ IN_PROC_BROWSER_TEST_F(TypedUrlsSyncPerfTest, P0) {
ASSERT_EQ(0, GetURLCount(1));
SyncTimingHelper::PrintResult("typed_urls", "delete_typed_urls", dt);
}
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 =
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 =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(num_urls, GetTypedUrlsFromClient(0).size());
AssertAllProfilesHaveSameURLsAsVerifier();
VLOG(0) << std::endl << "Update: " << num_urls << " "
<< dt_update.InSecondsF();
RemoveURLs(0);
base::TimeDelta dt_delete =
SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
ASSERT_EQ(0U, GetTypedUrlsFromClient(0).size());
AssertAllProfilesHaveSameURLsAsVerifier();
VLOG(0) << std::endl << "Delete: " << num_urls << " "
<< dt_delete.InSecondsF();
Cleanup();
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment