OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ASH_METRICS_TASK_SWITCH_METRIC_RECORDER_H_ | 5 #ifndef ASH_METRICS_TASK_SWITCH_METRIC_RECORDER_H_ |
6 #define ASH_METRICS_TASK_SWITCH_METRIC_RECORDER_H_ | 6 #define ASH_METRICS_TASK_SWITCH_METRIC_RECORDER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <unordered_map> | 10 #include <unordered_map> |
11 | 11 |
12 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
13 #include "ash/common/metrics/task_switch_source.h" | 13 #include "ash/metrics/task_switch_source.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 | 17 |
18 class TaskSwitchTimeTracker; | 18 class TaskSwitchTimeTracker; |
19 | 19 |
20 // The TaskSwitchMetricsRecorder class records UMA metrics related to task | 20 // The TaskSwitchMetricsRecorder class records UMA metrics related to task |
21 // switching. The main purpose of the TaskSwitchMetricsRecorder is to track time | 21 // switching. The main purpose of the TaskSwitchMetricsRecorder is to track time |
22 // deltas between task switches and record histograms of the deltas. | 22 // deltas between task switches and record histograms of the deltas. |
23 class ASH_EXPORT TaskSwitchMetricsRecorder { | 23 class ASH_EXPORT TaskSwitchMetricsRecorder { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // TaskSwitchTimeTracker is needed for a given source. | 64 // TaskSwitchTimeTracker is needed for a given source. |
65 std::unordered_map<int, std::unique_ptr<TaskSwitchTimeTracker>> | 65 std::unordered_map<int, std::unique_ptr<TaskSwitchTimeTracker>> |
66 histogram_map_; | 66 histogram_map_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(TaskSwitchMetricsRecorder); | 68 DISALLOW_COPY_AND_ASSIGN(TaskSwitchMetricsRecorder); |
69 }; | 69 }; |
70 | 70 |
71 } // namespace ash | 71 } // namespace ash |
72 | 72 |
73 #endif // ASH_METRICS_TASK_SWITCH_METRIC_RECORDER_H_ | 73 #endif // ASH_METRICS_TASK_SWITCH_METRIC_RECORDER_H_ |
OLD | NEW |