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

Unified Diff: chrome/browser/performance_monitor/constants.h

Issue 23825004: PerformanceMonitor: UMA alert for high browser CPU usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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 | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/performance_monitor/event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/performance_monitor/constants.h
diff --git a/chrome/browser/performance_monitor/constants.h b/chrome/browser/performance_monitor/constants.h
index 168baf22194ef083cc18f1f29c521d7c8cdf2aee..84dfb8ea775f3463e3dae46e0127e50dd6e34733 100644
--- a/chrome/browser/performance_monitor/constants.h
+++ b/chrome/browser/performance_monitor/constants.h
@@ -21,6 +21,8 @@ extern const char kProcessChromeAggregate[];
extern const char kStateChromeVersion[];
extern const char kStateProfilePrefix[];
+// The interval the watched processes are sampled for performance metrics.
+const int kSampleIntervalInSeconds = 10;
// The default interval at which PerformanceMonitor performs its timed
// collections; this can be overridden by using the kPerformanceMonitorGathering
// switch with an associated (positive integer) value.
@@ -41,6 +43,11 @@ const int64 kBytesPerTerabyte = kBytesPerGigabyte * (1 << 10);
const int64 kMicrosecondsPerMonth = base::Time::kMicrosecondsPerDay * 30;
const int64 kMicrosecondsPerYear = base::Time::kMicrosecondsPerDay * 365;
+// Performance alert thresholds
+
+// If a process is consistently above this CPU utilization percentage over time,
+// we consider it as high and may take action.
+const float kHighCPUUtilizationThreshold = 90.0f;
} // namespace performance_monitor
#endif // CHROME_BROWSER_PERFORMANCE_MONITOR_CONSTANTS_H_
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/performance_monitor/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698