OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <limits> | 5 #include <limits> |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/process/process_metrics.h" | 9 #include "base/process/process_metrics.h" |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 true); | 107 true); |
108 } | 108 } |
109 break; | 109 break; |
110 case content::PROCESS_TYPE_PLUGIN: | 110 case content::PROCESS_TYPE_PLUGIN: |
111 UMA_HISTOGRAM_CUSTOM_COUNTS( | 111 UMA_HISTOGRAM_CUSTOM_COUNTS( |
112 "PerformanceMonitor.AverageCPU.PluginProcess", average_cpu_usage, | 112 "PerformanceMonitor.AverageCPU.PluginProcess", average_cpu_usage, |
113 kHistogramMin, kHistogramMax, kHistogramBucketCount); | 113 kHistogramMin, kHistogramMax, kHistogramBucketCount); |
114 if (min_cpu_usage_ > kHighCPUUtilizationThreshold) | 114 if (min_cpu_usage_ > kHighCPUUtilizationThreshold) |
115 UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.PluginProcess", true); | 115 UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.PluginProcess", true); |
116 break; | 116 break; |
117 case content::PROCESS_TYPE_WORKER: | |
118 UMA_HISTOGRAM_CUSTOM_COUNTS( | |
119 "PerformanceMonitor.AverageCPU.WorkerProcess", average_cpu_usage, | |
120 kHistogramMin, kHistogramMax, kHistogramBucketCount); | |
121 if (min_cpu_usage_ > kHighCPUUtilizationThreshold) | |
122 UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.WorkerProcess", true); | |
123 break; | |
124 case content::PROCESS_TYPE_GPU: | 117 case content::PROCESS_TYPE_GPU: |
125 UMA_HISTOGRAM_CUSTOM_COUNTS( | 118 UMA_HISTOGRAM_CUSTOM_COUNTS( |
126 "PerformanceMonitor.AverageCPU.GPUProcess", average_cpu_usage, | 119 "PerformanceMonitor.AverageCPU.GPUProcess", average_cpu_usage, |
127 kHistogramMin, kHistogramMax, kHistogramBucketCount); | 120 kHistogramMin, kHistogramMax, kHistogramBucketCount); |
128 if (min_cpu_usage_ > kHighCPUUtilizationThreshold) | 121 if (min_cpu_usage_ > kHighCPUUtilizationThreshold) |
129 UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.GPUProcess", true); | 122 UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.GPUProcess", true); |
130 break; | 123 break; |
131 case content::PROCESS_TYPE_PPAPI_PLUGIN: | 124 case content::PROCESS_TYPE_PPAPI_PLUGIN: |
132 UMA_HISTOGRAM_CUSTOM_COUNTS( | 125 UMA_HISTOGRAM_CUSTOM_COUNTS( |
133 "PerformanceMonitor.AverageCPU.PPAPIProcess", average_cpu_usage, | 126 "PerformanceMonitor.AverageCPU.PPAPIProcess", average_cpu_usage, |
134 kHistogramMin, kHistogramMax, kHistogramBucketCount); | 127 kHistogramMin, kHistogramMax, kHistogramBucketCount); |
135 if (min_cpu_usage_ > kHighCPUUtilizationThreshold) | 128 if (min_cpu_usage_ > kHighCPUUtilizationThreshold) |
136 UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.PPAPIProcess", true); | 129 UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.PPAPIProcess", true); |
137 break; | 130 break; |
138 default: | 131 default: |
139 break; | 132 break; |
140 } | 133 } |
141 } | 134 } |
142 | 135 |
143 } // namespace performance_monitor | 136 } // namespace performance_monitor |
OLD | NEW |