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_METRIC_H_ | 5 #ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_H_ |
6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_H_ | 6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 | 10 |
11 namespace performance_monitor { | 11 namespace performance_monitor { |
12 | 12 |
13 // IMPORTANT: This is used as an indication of the metric type within the | 13 // IMPORTANT: This is used as an indication of the metric type within the |
14 // performance monitor database; do not change the order! If you add new | 14 // performance monitor database; do not change the order! If you add new |
15 // metric types to this list, place them above METRIC_NUMBER_OF_METRICS and add | 15 // metric types to this list, place them above METRIC_NUMBER_OF_METRICS and add |
16 // the appropriate constants to metric_details. | 16 // the appropriate constants to metric_details. |
17 enum MetricType { | 17 enum MetricType { |
18 METRIC_CPU_USAGE, | 18 METRIC_CPU_USAGE, |
19 METRIC_PRIVATE_MEMORY_USAGE, | 19 METRIC_PRIVATE_MEMORY_USAGE, |
20 METRIC_SHARED_MEMORY_USAGE, | 20 METRIC_SHARED_MEMORY_USAGE, |
21 METRIC_STARTUP_TIME, | 21 METRIC_STARTUP_TIME, |
22 METRIC_TEST_STARTUP_TIME, | 22 METRIC_TEST_STARTUP_TIME, |
23 METRIC_SESSION_RESTORE_TIME, | 23 METRIC_SESSION_RESTORE_TIME, |
24 METRIC_PAGE_LOAD_TIME, | 24 METRIC_PAGE_LOAD_TIME, |
| 25 METRIC_NETWORK_BYTES_READ, |
25 METRIC_NUMBER_OF_METRICS | 26 METRIC_NUMBER_OF_METRICS |
26 }; | 27 }; |
27 | 28 |
28 struct Metric { | 29 struct Metric { |
29 public: | 30 public: |
30 Metric(); | 31 Metric(); |
31 Metric(const base::Time& metric_time, const double metric_value); | 32 Metric(const base::Time& metric_time, const double metric_value); |
32 Metric(const std::string& metric_time, const std::string& metric_value); | 33 Metric(const std::string& metric_time, const std::string& metric_value); |
33 ~Metric(); | 34 ~Metric(); |
34 | 35 |
35 base::Time time; | 36 base::Time time; |
36 double value; | 37 double value; |
37 }; | 38 }; |
38 | 39 |
39 } // namespace performance_monitor | 40 } // namespace performance_monitor |
40 | 41 |
41 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_H_ | 42 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_H_ |
OLD | NEW |