Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: base/process/process_metrics.cc

Issue 29873002: PerformanceMonitor: Add a new UMA histograms to track average CPU utilization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment update Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/process_metrics.h ('k') | chrome/browser/performance_monitor/process_metrics_history.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_metrics.cc
diff --git a/base/process/process_metrics.cc b/base/process/process_metrics.cc
index 127fb4649f70b04f054db74b9f97b4132173d1fa..83289b8c78bf06c2ecc5f0a1f9bc479a5629f663 100644
--- a/base/process/process_metrics.cc
+++ b/base/process/process_metrics.cc
@@ -42,4 +42,12 @@ scoped_ptr<Value> SystemMetrics::ToValue() const {
return res.PassAs<Value>();
}
+double ProcessMetrics::GetPlatformIndependentCPUUsage() {
+#if defined(OS_WIN)
+ return GetCPUUsage() * processor_count_;
+#else
+ return GetCPUUsage();
+#endif
+}
+
} // namespace base
« no previous file with comments | « base/process/process_metrics.h ('k') | chrome/browser/performance_monitor/process_metrics_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698