diff options
author | oysteine@chromium.org <oysteine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-02 15:56:09 +0000 |
---|---|---|
committer | oysteine@chromium.org <oysteine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-02 15:56:09 +0000 |
commit | 56fd0a89174b70b665e6c0267a05e81beb86d510 (patch) | |
tree | 5fe813a40793f0a01257a46630451836cb584f5d /chrome/browser/performance_monitor/constants.h | |
parent | 22c808bb76ea5873bab7b39b9e4e53f1e11d208b (diff) | |
download | chromium_src-56fd0a89174b70b665e6c0267a05e81beb86d510.zip chromium_src-56fd0a89174b70b665e6c0267a05e81beb86d510.tar.gz chromium_src-56fd0a89174b70b665e6c0267a05e81beb86d510.tar.bz2 |
Modified the PerformanceMonitor to not use test/ code for enumerating Chrome processes.
Separated out basic performance metrics gathering in the PerformanceMonitor to run independently from the metrics/events database code. The former will now run even without the performance-monitor-gathering flag.
Added an UMA event which triggers when the browser process never runs below X CPU utilization over a period of Y seconds.
BUG=279660, 273320
Review URL: https://codereview.chromium.org/23825004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226466 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/performance_monitor/constants.h')
-rw-r--r-- | chrome/browser/performance_monitor/constants.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/performance_monitor/constants.h b/chrome/browser/performance_monitor/constants.h index 168baf2..84dfb8e 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_ |