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

Side by Side Diff: base/chromeos/memory_pressure_observer_chromeos.h

Issue 874483008: Add UMA stats to get the quality of service of memory pressure handling scheme in ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address the code review comment. Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_CHROMEOS_MEMORY_PRESSURE_OBSERVER_CHROMEOS_H_ 5 #ifndef BASE_CHROMEOS_MEMORY_PRESSURE_OBSERVER_CHROMEOS_H_
6 #define BASE_CHROMEOS_MEMORY_PRESSURE_OBSERVER_CHROMEOS_H_ 6 #define BASE_CHROMEOS_MEMORY_PRESSURE_OBSERVER_CHROMEOS_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 base::RepeatingTimer<MemoryPressureObserverChromeOS> timer_; 88 base::RepeatingTimer<MemoryPressureObserverChromeOS> timer_;
89 89
90 // To slow down the amount of moderate pressure event calls, this counter 90 // To slow down the amount of moderate pressure event calls, this counter
91 // gets used to count the number of events since the last event occured. 91 // gets used to count the number of events since the last event occured.
92 int moderate_pressure_repeat_count_; 92 int moderate_pressure_repeat_count_;
93 93
94 // The thresholds for moderate and critical pressure. 94 // The thresholds for moderate and critical pressure.
95 const int moderate_pressure_threshold_percent_; 95 const int moderate_pressure_threshold_percent_;
96 const int critical_pressure_threshold_percent_; 96 const int critical_pressure_threshold_percent_;
97 97
98 // Wall-clock time when the system entered non-critical or critical memory
99 // pressure mode.
100 base::TimeTicks non_critical_start_time_;
101 base::TimeTicks critical_start_time_;
102
103 // The length of time that the system stayed in non-critical or critical
104 // memory pressure mode.
105 base::TimeDelta non_critical_delta_;
Mr4D (OOO till 08-26) 2015/01/29 08:17:53 We do not need this value. It can be derived from
xdai1 2015/01/31 00:01:39 You're right. Deleted these two values.
106 base::TimeDelta critical_delta_;
Mr4D (OOO till 08-26) 2015/01/29 08:17:53 On a second thought - we do not need to store eith
xdai1 2015/01/31 00:01:39 Done.
107
98 base::WeakPtrFactory<MemoryPressureObserverChromeOS> weak_ptr_factory_; 108 base::WeakPtrFactory<MemoryPressureObserverChromeOS> weak_ptr_factory_;
99 109
100 DISALLOW_COPY_AND_ASSIGN(MemoryPressureObserverChromeOS); 110 DISALLOW_COPY_AND_ASSIGN(MemoryPressureObserverChromeOS);
101 }; 111 };
102 112
103 } // namespace base 113 } // namespace base
104 114
105 #endif // BASE_CHROMEOS_MEMORY_PRESSURE_OBSERVER_CHROMEOS_H_ 115 #endif // BASE_CHROMEOS_MEMORY_PRESSURE_OBSERVER_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | base/chromeos/memory_pressure_observer_chromeos.cc » ('j') | base/chromeos/memory_pressure_observer_chromeos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698