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

Side by Side Diff: chrome/test/live_sync/performance/sync_timing_helper.h

Issue 7464046: Sync performance tests: Cleanup TODOs and print in dashboard friendly format (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 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 #ifndef CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_ 5 #ifndef CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_
6 #define CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_ 6 #define CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 namespace base { 14 namespace base {
14 class TimeDelta; 15 class TimeDelta;
15 } 16 }
16 17
17 class ProfileSyncServiceHarness; 18 class ProfileSyncServiceHarness;
18 19
19 class SyncTimingHelper { 20 class SyncTimingHelper {
20 public: 21 public:
21 SyncTimingHelper(); 22 SyncTimingHelper();
22 ~SyncTimingHelper(); 23 ~SyncTimingHelper();
23 24
24 // Returns the time taken for |client| to complete a single sync cycle. 25 // Returns the time taken for |client| to complete a single sync cycle.
25 static base::TimeDelta TimeSyncCycle(ProfileSyncServiceHarness* client); 26 static base::TimeDelta TimeSyncCycle(ProfileSyncServiceHarness* client);
26 27
27 // Returns the time taken for both |client| and |partner| to complete a sync 28 // Returns the time taken for both |client| and |partner| to complete a sync
28 // cycle. 29 // cycle.
29 static base::TimeDelta TimeMutualSyncCycle( 30 static base::TimeDelta TimeMutualSyncCycle(
30 ProfileSyncServiceHarness* client, ProfileSyncServiceHarness* partner); 31 ProfileSyncServiceHarness* client, ProfileSyncServiceHarness* partner);
31 32
32 // Returns the time taken for all clients in |clients| to complete their 33 // Returns the time taken for all clients in |clients| to complete their
33 // respective sync cycles. 34 // respective sync cycles.
34 static base::TimeDelta TimeUntilQuiescence( 35 static base::TimeDelta TimeUntilQuiescence(
35 std::vector<ProfileSyncServiceHarness*>& clients); 36 std::vector<ProfileSyncServiceHarness*>& clients);
36 37
38 // Print a timing measurement in a format appropriate for the chromium perf
39 // dashboard. Simplified version of methods defined in
40 // chrome/test/ui/ui_perf_test.{h,cc}.
41 static void PrintResult(const std::string& measurement,
42 const std::string& trace,
43 const base::TimeDelta& dt);
Raghu Simha 2011/07/26 06:19:45 nit: Style guide recommends aligning parameters, o
braffert 2011/07/26 17:46:59 Done. I added static to the first line and forgot
44
37 private: 45 private:
38 DISALLOW_COPY_AND_ASSIGN(SyncTimingHelper); 46 DISALLOW_COPY_AND_ASSIGN(SyncTimingHelper);
39 }; 47 };
40 48
41 #endif // CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_ 49 #endif // CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698