OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <limits> | 5 #include <limits> |
6 | 6 |
7 #include "chrome/browser/jankometer.h" | 7 #include "chrome/browser/jankometer.h" |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/histogram.h" | 11 #include "base/histogram.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/ref_counted.h" | 13 #include "base/ref_counted.h" |
14 #include "base/stats_counters.h" | 14 #include "base/stats_counters.h" |
15 #include "base/thread.h" | 15 #include "base/thread.h" |
16 #include "base/time.h" | 16 #include "base/time.h" |
17 #include "base/watchdog.h" | 17 #include "base/watchdog.h" |
18 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
20 | 20 |
| 21 using base::TimeDelta; |
| 22 using base::TimeTicks; |
| 23 |
21 namespace { | 24 namespace { |
22 | 25 |
23 // The maximum threshold of delay of the message before considering it a delay. | 26 // The maximum threshold of delay of the message before considering it a delay. |
24 // For a debug build, you may want to set IO delay around 500ms. | 27 // For a debug build, you may want to set IO delay around 500ms. |
25 // For a release build, setting it around 350ms is sensible. | 28 // For a release build, setting it around 350ms is sensible. |
26 // Visit about:histograms to see what the distribution is on your system, with | 29 // Visit about:histograms to see what the distribution is on your system, with |
27 // your build. Be sure to do some work to get interesting stats. | 30 // your build. Be sure to do some work to get interesting stats. |
28 // The numbers below came from a warm start (you'll get about 5-10 alarms with | 31 // The numbers below came from a warm start (you'll get about 5-10 alarms with |
29 // a cold start), and running the page-cycler for 5 rounds. | 32 // a cold start), and running the page-cycler for 5 rounds. |
30 #ifdef NDEBUG | 33 #ifdef NDEBUG |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 ui_observer = NULL; | 221 ui_observer = NULL; |
219 } | 222 } |
220 if (io_observer) { | 223 if (io_observer) { |
221 // IO thread can't be running when we remove observers. | 224 // IO thread can't be running when we remove observers. |
222 DCHECK((!g_browser_process) || !(g_browser_process->io_thread())); | 225 DCHECK((!g_browser_process) || !(g_browser_process->io_thread())); |
223 io_observer->Release(); | 226 io_observer->Release(); |
224 io_observer = NULL; | 227 io_observer = NULL; |
225 } | 228 } |
226 } | 229 } |
227 | 230 |
OLD | NEW |