OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Module for performance testing using the psutil library. | 6 """Module for performance testing using the psutil library. |
7 | 7 |
8 Ref: http://code.google.com/p/psutil/wiki/Documentation | 8 Ref: http://code.google.com/p/psutil/wiki/Documentation |
9 | 9 |
10 Most part of this module is from chrome/test/startup/startup_test.cc and | 10 Most part of this module is from chrome/test/perf/startup_test.cc and |
11 chrome/test/ui/ui_perf_test.[h,cc] So, we try to preserve the original C++ code | 11 chrome/test/ui/ui_perf_test.[h,cc] So, we try to preserve the original C++ code |
12 here in case when there is change in original C++ code, it is easy to update | 12 here in case when there is change in original C++ code, it is easy to update |
13 this. | 13 this. |
14 """ | 14 """ |
15 | 15 |
16 # Standard library imports. | 16 # Standard library imports. |
17 import logging | 17 import logging |
18 import re | 18 import re |
19 import time | 19 import time |
20 | 20 |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 Returns: | 328 Returns: |
329 a string for performance results that are used for PerfBot if there | 329 a string for performance results that are used for PerfBot if there |
330 is any result. Otherwise, returns an empty string. | 330 is any result. Otherwise, returns an empty string. |
331 """ | 331 """ |
332 output_string_line = UIPerfTestUtils.GetResultStringForPerfBot( | 332 output_string_line = UIPerfTestUtils.GetResultStringForPerfBot( |
333 '', name, trace_name, psutil_data, measured_data_unit) | 333 '', name, trace_name, psutil_data, measured_data_unit) |
334 if output_string_line: | 334 if output_string_line: |
335 return output_string_line + '\n' | 335 return output_string_line + '\n' |
336 else: | 336 else: |
337 return '' | 337 return '' |
OLD | NEW |