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

Side by Side Diff: chrome/browser/memory/memory_kills_histogram.h

Issue 2527973003: Consolidate code monitoring low memory kills and OOM kills to MemoryKillsMonitor on ChromeOS. (Closed)
Patch Set: move unittest to chromeos only build rule Created 4 years 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MEMORY_MEMORY_KILLS_HISTOGRAM_H_
6 #define CHROME_BROWSER_MEMORY_MEMORY_KILLS_HISTOGRAM_H_
7
8 #include "base/metrics/histogram.h"
9 #include "base/time/time.h"
10
11 namespace memory {
12
13 constexpr base::TimeDelta kMaxMemoryKillTimeDelta =
14 base::TimeDelta::FromSeconds(30);
15
16 } // namespace memory
17
18 // Use this macro to report elapsed time since last Memory kill event.
19 // Must be a macro as the underlying HISTOGRAM macro creates static variables.
20 #define UMA_HISTOGRAM_MEMORY_KILL_TIME_INTERVAL(name, sample) \
21 UMA_HISTOGRAM_CUSTOM_TIMES( \
22 name, sample, base::TimeDelta::FromMilliseconds(1), \
23 ::memory::kMaxMemoryKillTimeDelta, 50)
24
25 #endif // CHROME_BROWSER_MEMORY_MEMORY_KILLS_HISTOGRAM_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/memory/memory_kills_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698