Index: chrome/browser/performance_monitor/process_metrics_history.cc |
diff --git a/chrome/browser/performance_monitor/process_metrics_history.cc b/chrome/browser/performance_monitor/process_metrics_history.cc |
index 9ac206fb36151817a4ccbe446fb28fab2d91d2f6..7bf658deda4821fcdeb4fd72e846bb9e3035ab70 100644 |
--- a/chrome/browser/performance_monitor/process_metrics_history.cc |
+++ b/chrome/browser/performance_monitor/process_metrics_history.cc |
@@ -74,9 +74,13 @@ void ProcessMetricsHistory::EndOfCycle() { |
void ProcessMetricsHistory::RunPerformanceTriggers() { |
// As an initial step, we only care about browser processes. |
- if (process_type_ != content::PROCESS_TYPE_BROWSER) |
+ if (process_type_ != content::PROCESS_TYPE_BROWSER || sample_count_ == 0) |
return; |
+ UMA_HISTOGRAM_CUSTOM_COUNTS("PerformanceMonitor.AverageCPU.BrowserProcess", |
+ accumulated_cpu_usage_ / sample_count_, |
+ 0, 1200, 20); |
+ |
// If CPU usage has consistently been above our threshold, |
// we *may* have an issue. |
if (min_cpu_usage_ > kHighCPUUtilizationThreshold) |