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

Side by Side Diff: chrome/test/live_sync/performance/sync_timing_helper.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/live_sync/live_sync_timing_helper.h" 5 #include "chrome/test/live_sync/performance/sync_timing_helper.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "chrome/browser/sync/profile_sync_service_harness.h" 8 #include "chrome/browser/sync/profile_sync_service_harness.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 LiveSyncTimingHelper::LiveSyncTimingHelper() {} 11 SyncTimingHelper::SyncTimingHelper() {}
12 12
13 LiveSyncTimingHelper::~LiveSyncTimingHelper() {} 13 SyncTimingHelper::~SyncTimingHelper() {}
14 14
15 base::TimeDelta LiveSyncTimingHelper::TimeSyncCycle( 15 // static
16 base::TimeDelta SyncTimingHelper::TimeSyncCycle(
16 ProfileSyncServiceHarness* client) { 17 ProfileSyncServiceHarness* client) {
17 base::Time start = base::Time::Now(); 18 base::Time start = base::Time::Now();
18 EXPECT_TRUE(client->AwaitSyncCycleCompletion("Timing sync cycle.")); 19 EXPECT_TRUE(client->AwaitSyncCycleCompletion("Timing sync cycle."));
19 return base::Time::Now() - start; 20 return base::Time::Now() - start;
20 } 21 }
21 22
22 base::TimeDelta LiveSyncTimingHelper::TimeMutualSyncCycle( 23 // static
24 base::TimeDelta SyncTimingHelper::TimeMutualSyncCycle(
23 ProfileSyncServiceHarness* client, ProfileSyncServiceHarness* partner) { 25 ProfileSyncServiceHarness* client, ProfileSyncServiceHarness* partner) {
24 base::Time start = base::Time::Now(); 26 base::Time start = base::Time::Now();
25 EXPECT_TRUE(client->AwaitMutualSyncCycleCompletion(partner)); 27 EXPECT_TRUE(client->AwaitMutualSyncCycleCompletion(partner));
26 return base::Time::Now() - start; 28 return base::Time::Now() - start;
27 } 29 }
28 30
29 base::TimeDelta LiveSyncTimingHelper::TimeUntilQuiescence( 31 // static
32 base::TimeDelta SyncTimingHelper::TimeUntilQuiescence(
30 std::vector<ProfileSyncServiceHarness*>& clients) { 33 std::vector<ProfileSyncServiceHarness*>& clients) {
31 base::Time start = base::Time::Now(); 34 base::Time start = base::Time::Now();
32 EXPECT_TRUE(ProfileSyncServiceHarness::AwaitQuiescence(clients)); 35 EXPECT_TRUE(ProfileSyncServiceHarness::AwaitQuiescence(clients));
33 return base::Time::Now() - start; 36 return base::Time::Now() - start;
34 } 37 }
OLDNEW
« no previous file with comments | « chrome/test/live_sync/performance/sync_timing_helper.h ('k') | chrome/test/live_sync/performance/typed_urls_sync_perf_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698