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 // TODO(chebert): i18n on all constants. | 9 // TODO(chebert): i18n on all constants. |
10 | 10 |
11 // The error message displayed when a metric's details are not found. | 11 // The error message displayed when a metric's details are not found. |
12 const char kMetricNotFoundError[] = "Metric details not found."; | 12 const char kMetricNotFoundError[] = "Metric details not found."; |
13 | 13 |
14 // Any metric that is not associated with a specific activity will use this as | 14 // Any metric that is not associated with a specific activity will use this as |
15 // its activity. | 15 // its activity. |
16 const char kProcessChromeAggregate[] = "chrome_aggregate"; | 16 const char kProcessChromeAggregate[] = "chrome_aggregate"; |
17 | 17 |
18 // The interval at which PerformanceMonitor performs its timed collections. | 18 // The interval at which PerformanceMonitor performs its timed collections. |
19 const int kGatherIntervalInMinutes = 2; | 19 const int kGatherIntervalInMinutes = 2; |
20 | 20 |
21 // Tokens to retrieve state values from the database. | 21 // Tokens to retrieve state values from the database. |
22 | 22 |
23 // Stores information about the previous chrome version. | 23 // Stores information about the previous chrome version. |
24 const char kStateChromeVersion[] = "chrome_version"; | 24 const char kStateChromeVersion[] = "chrome_version"; |
25 // The prefix to the state of a profile's name, to prevent any possible naming | 25 // The prefix to the state of a profile's name, to prevent any possible naming |
26 // collisions in the database. | 26 // collisions in the database. |
27 const char kStateProfilePrefix[] = "profile"; | 27 const char kStateProfilePrefix[] = "profile"; |
28 | 28 |
29 // Metric details follow. | |
30 // All metric details have the following constants: | |
31 // - Name | |
32 // - Description | |
33 // - Units | |
34 // - TickSize (the smallest possible maximum which will be viewed in the ui.) | |
35 | |
36 // CPU Usage | |
37 const char kMetricCPUUsageName[] = "CPU Usage"; | |
38 const char kMetricCPUUsageDescription[] = "The CPU usage measured in percent."; | |
39 const char kMetricCPUUsageUnits[] = "percent"; | |
40 const double kMetricCPUUsageTickSize = 100.0; | |
41 | |
42 // Private Memory Usage | |
43 const char kMetricPrivateMemoryUsageName[] = "Private Memory Usage"; | |
44 const char kMetricPrivateMemoryUsageDescription[] = | |
45 "The total private memory usage of all chrome processes measured in bytes."; | |
46 const char kMetricPrivateMemoryUsageUnits[] = "bytes"; | |
47 const double kMetricPrivateMemoryUsageTickSize = 10000000.0; | |
48 | |
49 // Shared Memory Usage | |
50 const char kMetricSharedMemoryUsageName[] = "Shared Memory Usage"; | |
51 const char kMetricSharedMemoryUsageDescription[] = | |
52 "The total shared memory usage of all chrome processes measured in bytes."; | |
53 const char kMetricSharedMemoryUsageUnits[] = "bytes"; | |
54 const double kMetricSharedMemoryUsageTickSize = 10000000.0; | |
55 | |
56 // Startup Time | |
57 const char kMetricStartupTimeName[] = "Startup Time"; | |
58 const char kMetricStartupTimeDescription[] = | |
59 "The startup time measured in microseconds"; | |
60 const char kMetricStartupTimeUnits[] = "microseconds"; | |
61 const double kMetricStartupTimeTickSize = 5000000; | |
62 | |
63 // Test Startup Time | |
64 const char kMetricTestStartupTimeName[] = "Test Startup Time"; | |
65 const char kMetricTestStartupTimeDescription[] = | |
66 "The startup time of test startups measured in microseconds"; | |
67 const char kMetricTestStartupTimeUnits[] = "microseconds"; | |
68 const double kMetricTestStartupTimeTickSize = 5000000; | |
69 | |
70 // Session Restore Time | |
71 const char kMetricSessionRestoreTimeName[] = "Session Restore Time"; | |
72 const char kMetricSessionRestoreTimeDescription[] = | |
73 "The session restore time measured in microseconds"; | |
74 const char kMetricSessionRestoreTimeUnits[] = "microseconds"; | |
75 const double kMetricSessionRestoreTimeTickSize = 5000000; | |
76 | |
77 } // namespace performance_monitor | 29 } // namespace performance_monitor |
OLD | NEW |