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_PERFORMANCE_MONITOR_CONSTANTS_H_ | 5 #ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_CONSTANTS_H_ |
6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_CONSTANTS_H_ | 6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_CONSTANTS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | |
9 #include "base/time.h" | |
10 | |
8 namespace performance_monitor { | 11 namespace performance_monitor { |
9 | 12 |
10 // Constants which are used by the PerformanceMonitor and its related classes. | 13 // Constants which are used by the PerformanceMonitor and its related classes. |
11 // The constants should be documented alongside the definition of their values | 14 // The constants should be documented alongside the definition of their values |
12 // in the .cc file. | 15 // in the .cc file. |
13 | 16 |
14 extern const char kMetricNotFoundError[]; | 17 extern const char kMetricNotFoundError[]; |
15 extern const char kProcessChromeAggregate[]; | 18 extern const char kProcessChromeAggregate[]; |
16 extern const int kDefaultGatherIntervalInSeconds; | 19 extern const int kDefaultGatherIntervalInSeconds; |
17 | 20 |
18 // State tokens | 21 // State tokens |
19 extern const char kStateChromeVersion[]; | 22 extern const char kStateChromeVersion[]; |
20 extern const char kStateProfilePrefix[]; | 23 extern const char kStateProfilePrefix[]; |
21 | 24 |
25 // Unit values (for use in metric, and on the UI side). | |
26 | |
27 // Memory measurements | |
28 const int64 kBytesPerKilobyte = 1 << 10; | |
Evan Stade
2012/09/14 08:39:16
define in cc
Devlin
2012/09/17 16:35:59
Done.
| |
29 const int64 kBytesPerMegabyte = kBytesPerKilobyte * (1 << 10); | |
30 const int64 kBytesPerGigabyte = kBytesPerMegabyte * (1 << 10); | |
31 const int64 kBytesPerTerabyte = kBytesPerGigabyte * (1 << 10); | |
32 | |
33 // Time measurements - Most of these are imported from base/time.h | |
34 // These units are used for display (and it's related calculations), not for | |
35 // any mathematical analysis. Thus we can estimate for values without an exact | |
36 // conversion. | |
37 const int64 kMicrosecondsPerMonth = base::Time::kMicrosecondsPerDay * 30; | |
38 const int64 kMicrosecondsPerYear = base::Time::kMicrosecondsPerDay * 365; | |
39 | |
22 } // namespace performance_monitor | 40 } // namespace performance_monitor |
23 | 41 |
24 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_CONSTANTS_H_ | 42 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_CONSTANTS_H_ |
OLD | NEW |