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 import os | 5 import os |
6 | 6 |
7 from chrome_profiler import controllers_unittest | 7 from chrome_profiler import controllers_unittest |
8 from chrome_profiler import systrace_controller | 8 from chrome_profiler import systrace_controller |
9 | 9 |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 controller.StartTracing(interval) | 27 controller.StartTracing(interval) |
28 finally: | 28 finally: |
29 controller.StopTracing() | 29 controller.StopTracing() |
30 | 30 |
31 result = controller.PullTrace() | 31 result = controller.PullTrace() |
32 try: | 32 try: |
33 with open(result) as f: | 33 with open(result) as f: |
34 self.assertTrue('CPU#' in f.read()) | 34 self.assertTrue('CPU#' in f.read()) |
35 finally: | 35 finally: |
36 os.remove(result) | 36 os.remove(result) |
OLD | NEW |