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 // The synthetic delay framework makes it possible to dynamically inject | 5 // The synthetic delay framework makes it possible to dynamically inject |
6 // arbitrary delays into into different parts of the codebase. This can be used, | 6 // arbitrary delays into into different parts of the codebase. This can be used, |
7 // for instance, for testing various task scheduling algorithms. | 7 // for instance, for testing various task scheduling algorithms. |
8 // | 8 // |
9 // The delays are specified in terms of a target duration for a given block of | 9 // The delays are specified in terms of a target duration for a given block of |
10 // code. If the code executes faster than the duration, the thread is made to | 10 // code. If the code executes faster than the duration, the thread is made to |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 DISALLOW_COPY_AND_ASSIGN(ScopedSyntheticDelay); | 157 DISALLOW_COPY_AND_ASSIGN(ScopedSyntheticDelay); |
158 }; | 158 }; |
159 | 159 |
160 // Helper for registering delays. Do not use directly. | 160 // Helper for registering delays. Do not use directly. |
161 TRACE_EVENT_API_CLASS_EXPORT base::trace_event::TraceEventSyntheticDelay* | 161 TRACE_EVENT_API_CLASS_EXPORT base::trace_event::TraceEventSyntheticDelay* |
162 GetOrCreateDelay(const char* name, base::subtle::AtomicWord* impl_ptr); | 162 GetOrCreateDelay(const char* name, base::subtle::AtomicWord* impl_ptr); |
163 | 163 |
164 } // namespace trace_event_internal | 164 } // namespace trace_event_internal |
165 | 165 |
166 #endif /* BASE_TRACE_EVENT_TRACE_EVENT_SYNTHETIC_DELAY_H_ */ | 166 #endif // BASE_TRACE_EVENT_TRACE_EVENT_SYNTHETIC_DELAY_H_ |
OLD | NEW |