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

Side by Side Diff: chrome/test/live_sync/live_sync_timing_helper.cc

Issue 7171003: Performance tests for bookmark sync. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Missing comments + extra refactoring Created 9 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/test/live_sync/live_sync_timing_helper.h"
6
7 #include "base/time.h"
8 #include "chrome/browser/sync/profile_sync_service_harness.h"
9 #include "chrome/test/live_sync/live_sync_test.h"
10
11 LiveSyncTimingHelper::LiveSyncTimingHelper() {}
12
13 LiveSyncTimingHelper::~LiveSyncTimingHelper() {}
14
15 void LiveSyncTimingHelper::Setup(LiveSyncTest* test) {
16 test_ = test;
17 }
18
19 base::TimeDelta LiveSyncTimingHelper::TimeSyncCycle(
20 ProfileSyncServiceHarness* client) {
21 base::Time start = base::Time::Now();
22 EXPECT_TRUE(client->AwaitSyncCycleCompletion("Timing sync cycle."));
23 return base::Time::Now() - start;
24 }
25
26 base::TimeDelta LiveSyncTimingHelper::TimeMutualSyncCycle(
27 ProfileSyncServiceHarness* client, ProfileSyncServiceHarness* partner) {
28 base::Time start = base::Time::Now();
29 EXPECT_TRUE(client->AwaitMutualSyncCycleCompletion(partner));
30 return base::Time::Now() - start;
31 }
32
33 base::TimeDelta LiveSyncTimingHelper::TimeUntilQuiescence() {
34 base::Time start = base::Time::Now();
35 EXPECT_TRUE(test_->AwaitQuiescence());
36 return base::Time::Now() - start;
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698