OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_SYNC_TEST_INTEGRATION_PERFORMANCE_SYNC_TIMING_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_PERFORMANCE_SYNC_TIMING_HELPER_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PERFORMANCE_SYNC_TIMING_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PERFORMANCE_SYNC_TIMING_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 class TimeDelta; | 12 class TimeDelta; |
13 } | 13 } |
14 | 14 |
15 class ProfileSyncServiceHarness; | 15 class ProfileSyncServiceHarness; |
16 | 16 |
17 namespace sync_timing_helper { | 17 namespace sync_timing_helper { |
18 | 18 |
19 // Returns the time taken for |client| to complete a single sync cycle. | 19 // Returns the time taken for |client| to complete a single sync cycle. |
20 base::TimeDelta TimeSyncCycle(ProfileSyncServiceHarness* client); | 20 base::TimeDelta TimeSyncCycle(ProfileSyncServiceHarness* client); |
21 | 21 |
22 // Returns the time taken for both |client| and |partner| to complete a sync | 22 // Returns the time taken for both |client| and |partner| to complete a sync |
23 // cycle. | 23 // cycle. |
24 base::TimeDelta TimeMutualSyncCycle(ProfileSyncServiceHarness* client, | 24 base::TimeDelta TimeMutualSyncCycle(ProfileSyncServiceHarness* client, |
25 ProfileSyncServiceHarness* partner); | 25 ProfileSyncServiceHarness* partner); |
26 | 26 |
27 // Returns the time taken for all clients in |clients| to complete their | 27 // Returns the time taken for all clients in |clients| to complete their |
28 // respective sync cycles. | 28 // respective sync cycles. |
29 base::TimeDelta TimeUntilQuiescence( | 29 base::TimeDelta TimeUntilQuiescence( |
30 const std::vector<ProfileSyncServiceHarness*>& clients); | 30 std::vector<ProfileSyncServiceHarness*> clients); |
31 | 31 |
32 // Print a timing measurement in a format appropriate for the chromium perf | 32 // Print a timing measurement in a format appropriate for the chromium perf |
33 // dashboard. Simplified version of methods defined in | 33 // dashboard. Simplified version of methods defined in |
34 // chrome/test/ui/ui_perf_test.{h,cc}. | 34 // chrome/test/ui/ui_perf_test.{h,cc}. |
35 void PrintResult(const std::string& measurement, | 35 void PrintResult(const std::string& measurement, |
36 const std::string& trace, | 36 const std::string& trace, |
37 const base::TimeDelta& dt); | 37 const base::TimeDelta& dt); |
38 | 38 |
39 } // namespace sync_timing_helper | 39 } // namespace sync_timing_helper |
40 | 40 |
41 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_PERFORMANCE_SYNC_TIMING_HELPER_H
_ | 41 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_PERFORMANCE_SYNC_TIMING_HELPER_H
_ |
OLD | NEW |