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 #include "chrome/browser/performance_monitor/constants.h" | 5 #include "chrome/browser/performance_monitor/constants.h" |
6 | 6 |
7 namespace performance_monitor { | 7 namespace performance_monitor { |
8 | 8 |
9 // The key to insert/retrieve information about the chrome version from the | 9 // TODO(chebert): i18n on all constants. |
10 // database. | 10 |
11 const char kStateChromeVersion[] = "chrome_version"; | 11 // The error message displayed when a metric's details are not found. |
12 const char kMetricNotFoundError[] = "Mertic details not found."; | 12 const char kMetricNotFoundError[] = "Metric details not found."; |
| 13 |
| 14 // Any metric that is not associated with a specific activity will use this as |
| 15 // its activity. |
13 const char kProcessChromeAggregate[] = "chrome_aggregate"; | 16 const char kProcessChromeAggregate[] = "chrome_aggregate"; |
14 | 17 |
| 18 // Tokens to retrieve state values from the database. |
| 19 |
| 20 // Stores information about the previous chrome version. |
| 21 const char kStateChromeVersion[] = "chrome_version"; |
| 22 // The prefix to the state of a profile's name, to prevent any possible naming |
| 23 // collisions in the database. |
| 24 const char kStateProfilePrefix[] = "profile"; |
| 25 |
| 26 // Metric details follow. |
| 27 // All metric details have the following constants: |
| 28 // - Name |
| 29 // - Description |
| 30 // - Units |
| 31 // - TickSize (the smallest possible maximum which will be viewed in the ui.) |
| 32 |
| 33 // CPU Usage |
15 const char kMetricCPUUsageName[] = "CPU Usage"; | 34 const char kMetricCPUUsageName[] = "CPU Usage"; |
16 const char kMetricCPUUsageDescription[] = "The CPU usage measured in percent."; | 35 const char kMetricCPUUsageDescription[] = "The CPU usage measured in percent."; |
17 const char kMetricCPUUsageUnits[] = "percent"; | 36 const char kMetricCPUUsageUnits[] = "percent"; |
18 const double kMetricCPUUsageTickSize = 100.0; | 37 const double kMetricCPUUsageTickSize = 100.0; |
19 | 38 |
| 39 // Private Memory Usage |
20 const char kMetricPrivateMemoryUsageName[] = "Private Memory Usage"; | 40 const char kMetricPrivateMemoryUsageName[] = "Private Memory Usage"; |
21 const char kMetricPrivateMemoryUsageDescription[] = | 41 const char kMetricPrivateMemoryUsageDescription[] = |
22 "The private memory usage measured in bytes."; | 42 "The private memory usage measured in bytes."; |
23 const char kMetricPrivateMemoryUsageUnits[] = "percent"; | 43 const char kMetricPrivateMemoryUsageUnits[] = "percent"; |
24 const double kMetricPrivateMemoryUsageTickSize = 10000000.0; | 44 const double kMetricPrivateMemoryUsageTickSize = 10000000.0; |
25 | 45 |
26 | |
27 } // namespace performance_monitor | 46 } // namespace performance_monitor |
OLD | NEW |