Chromium Code Reviews| 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); |
|
Alexei Svitkine (slow)
2013/10/18 21:39:12
Can you explain why you're using these parameters?
oystein (OOO til 10th of July)
2013/10/21 14:38:45
1200 is the maximum value we'd see on a 12-core no
Alexei Svitkine (slow)
2013/10/21 14:53:46
I'd suggest picking a value that's more future-pro
oystein (OOO til 10th of July)
2013/10/21 15:15:05
Sure, I'll bounce it to 6400 or something.
Alexei Svitkine (slow)
2013/10/21 15:27:31
All right. And you're okay with the exponential bu
|
| + |
| // If CPU usage has consistently been above our threshold, |
| // we *may* have an issue. |
| if (min_cpu_usage_ > kHighCPUUtilizationThreshold) |