Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / sync / test / integration / performance / sync_timing_helper.h
blob313049432935a018d081b8999df3dc65292fb217
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_PERFORMANCE_SYNC_TIMING_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PERFORMANCE_SYNC_TIMING_HELPER_H_
8 #include "base/basictypes.h"
10 #include <string>
11 #include <vector>
13 namespace base {
14 class TimeDelta;
17 class ProfileSyncServiceHarness;
19 class SyncTimingHelper {
20 public:
21 SyncTimingHelper();
22 ~SyncTimingHelper();
24 // Returns the time taken for |client| to complete a single sync cycle.
25 static base::TimeDelta TimeSyncCycle(ProfileSyncServiceHarness* client);
27 // Returns the time taken for both |client| and |partner| to complete a sync
28 // cycle.
29 static base::TimeDelta TimeMutualSyncCycle(
30 ProfileSyncServiceHarness* client, ProfileSyncServiceHarness* partner);
32 // Returns the time taken for all clients in |clients| to complete their
33 // respective sync cycles.
34 static base::TimeDelta TimeUntilQuiescence(
35 std::vector<ProfileSyncServiceHarness*>& clients);
37 // Print a timing measurement in a format appropriate for the chromium perf
38 // dashboard. Simplified version of methods defined in
39 // chrome/test/ui/ui_perf_test.{h,cc}.
40 static void PrintResult(const std::string& measurement,
41 const std::string& trace,
42 const base::TimeDelta& dt);
44 private:
45 DISALLOW_COPY_AND_ASSIGN(SyncTimingHelper);
48 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_PERFORMANCE_SYNC_TIMING_HELPER_H_