OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_ARC_METRICS_OOM_KILLS_HISTOGRAM_H_ | 5 #ifndef CHROME_BROWSER_MEMORY_MEMORY_KILLS_HISTOGRAM_H_ |
6 #define COMPONENTS_ARC_METRICS_OOM_KILLS_HISTOGRAM_H_ | 6 #define CHROME_BROWSER_MEMORY_MEMORY_KILLS_HISTOGRAM_H_ |
7 | 7 |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
hidehiko
2016/11/25 10:13:21
#include "base/time/time.h", too?
cylee1
2016/11/29 20:28:40
Done.
| |
9 | 9 |
10 namespace arc { | 10 namespace memory { |
11 | 11 |
12 const int kMaxOomMemoryKillTimeDeltaSecs = 30; | 12 const int kMaxMemoryKillTimeDeltaSecs = 30; |
hidehiko
2016/11/25 10:13:21
base::TimeDelta supports constexpr. So,
constexpr
cylee1
2016/11/29 20:28:40
Done.
| |
13 | 13 |
14 } // namespace arc | 14 } // namespace memory |
15 | 15 |
16 // Use this macro to report elapsed time since last OOM kill event. | 16 // Use this macro to report elapsed time since last OOM kill event. |
17 // Must be a macro as the underlying HISTOGRAM macro creates static variables. | 17 // Must be a macro as the underlying HISTOGRAM macro creates static variables. |
18 #define UMA_HISTOGRAM_OOM_KILL_TIME_INTERVAL(name, sample) \ | 18 #define UMA_HISTOGRAM_OOM_KILL_TIME_INTERVAL(name, sample) \ |
19 UMA_HISTOGRAM_CUSTOM_TIMES( \ | 19 UMA_HISTOGRAM_CUSTOM_TIMES( \ |
20 name, sample, base::TimeDelta::FromMilliseconds(1), \ | 20 name, sample, base::TimeDelta::FromMilliseconds(1), \ |
21 base::TimeDelta::FromSeconds(::arc::kMaxOomMemoryKillTimeDeltaSecs), 50) | 21 base::TimeDelta::FromSeconds(::memory::kMaxMemoryKillTimeDeltaSecs), 50) |
22 | 22 |
23 #endif // COMPONENTS_ARC_METRICS_OOM_KILLS_HISTOGRAM_H_ | 23 #endif // CHROME_BROWSER_MEMORY_MEMORY_KILLS_HISTOGRAM_H_ |
OLD | NEW |