OLD | NEW |
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 #include "components/device_event_log/device_event_log.h" | 5 #include "components/device_event_log/device_event_log.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "components/device_event_log/device_event_log_impl.h" | 11 #include "components/device_event_log/device_event_log_impl.h" |
12 | 12 |
13 namespace device_event_log { | 13 namespace device_event_log { |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 const size_t kDefaultMaxEntries = 4000; | 17 const size_t kDefaultMaxEntries = 4000; |
18 | 18 |
19 const int kSlowMethodThresholdMs = 10; | 19 const int kSlowMethodThresholdMs = 10; |
20 const int kVerySlowMethodThresholdMs = 50; | 20 const int kVerySlowMethodThresholdMs = 50; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 level = LOG_LEVEL_ERROR; | 116 level = LOG_LEVEL_ERROR; |
117 DEVICE_LOG(type_, level) << "@@@ Slow method: " << file_ << ":" << name_ | 117 DEVICE_LOG(type_, level) << "@@@ Slow method: " << file_ << ":" << name_ |
118 << ": " << timer_.Elapsed().InMilliseconds() | 118 << ": " << timer_.Elapsed().InMilliseconds() |
119 << "ms"; | 119 << "ms"; |
120 } | 120 } |
121 } | 121 } |
122 | 122 |
123 } // namespace internal | 123 } // namespace internal |
124 | 124 |
125 } // namespace device_event_log | 125 } // namespace device_event_log |
OLD | NEW |