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

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

Issue 7491062: Sync performance test: Remove disabled benchmark tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 9 years, 4 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/passwords_sync_perf_test.cc
diff --git a/chrome/test/live_sync/performance/passwords_sync_perf_test.cc b/chrome/test/live_sync/performance/passwords_sync_perf_test.cc
index 780dea571828049257d88a93146b277247b001fc..349d003a2c3feae5f5dabc1888b3d0b46536d586 100644
--- a/chrome/test/live_sync/performance/passwords_sync_perf_test.cc
+++ b/chrome/test/live_sync/performance/passwords_sync_perf_test.cc
@@ -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();
- }
-}

Powered by Google App Engine
This is Rietveld 408576698