OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/browser/metrics/time_ticks_experiment_win.h" | 5 #include "chrome/browser/metrics/time_ticks_experiment_win.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <algorithm> | 10 #include <algorithm> |
11 | 11 |
12 #include "base/cpu.h" | 12 #include "base/cpu.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
14 #include "base/win/windows_version.h" | 14 #include "base/win/windows_version.h" |
| 15 #include "build/build_config.h" |
15 | 16 |
16 namespace chrome { | 17 namespace chrome { |
17 | 18 |
18 namespace { | 19 namespace { |
19 | 20 |
20 const int kNumIterations = 1000; | 21 const int kNumIterations = 1000; |
21 | 22 |
22 } // anonymous namespace | 23 } // anonymous namespace |
23 | 24 |
24 void CollectTimeTicksStats() { | 25 void CollectTimeTicksStats() { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 bool success = min_delta_ns <= 10000; | 107 bool success = min_delta_ns <= 10000; |
107 if (success) { | 108 if (success) { |
108 UMA_HISTOGRAM_ENUMERATION("WinTimeTicks.VersionSuccessful", | 109 UMA_HISTOGRAM_ENUMERATION("WinTimeTicks.VersionSuccessful", |
109 info->version(), base::win::VERSION_WIN_LAST); | 110 info->version(), base::win::VERSION_WIN_LAST); |
110 } | 111 } |
111 } | 112 } |
112 | 113 |
113 } // namespace chrome | 114 } // namespace chrome |
114 | 115 |
115 #endif // defined(OS_WIN) | 116 #endif // defined(OS_WIN) |
OLD | NEW |