| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 core import perf_benchmark | 7 from core import perf_benchmark |
| 8 | 8 |
| 9 from telemetry import benchmark | 9 from telemetry import benchmark |
| 10 from telemetry.core import util | 10 from telemetry.core import util |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 skipped = [] | 54 skipped = [] |
| 55 if os.path.exists(skipped_file): | 55 if os.path.exists(skipped_file): |
| 56 for line in open(skipped_file, 'r').readlines(): | 56 for line in open(skipped_file, 'r').readlines(): |
| 57 line = line.strip() | 57 line = line.strip() |
| 58 if line and not line.startswith('#'): | 58 if line and not line.startswith('#'): |
| 59 skipped_path = os.path.join(os.path.dirname(skipped_file), line) | 59 skipped_path = os.path.join(os.path.dirname(skipped_file), line) |
| 60 skipped.append(skipped_path.replace('/', os.sep)) | 60 skipped.append(skipped_path.replace('/', os.sep)) |
| 61 _AddDir(path, tuple(skipped)) | 61 _AddDir(path, tuple(skipped)) |
| 62 else: | 62 else: |
| 63 _AddPage(path) | 63 _AddPage(path) |
| 64 ps = page_set.PageSet(file_path=os.getcwd()+os.sep, | 64 ps = page_set.PageSet(base_dir=os.getcwd()+os.sep, |
| 65 serving_dirs=serving_dirs) | 65 serving_dirs=serving_dirs) |
| 66 for url in page_urls: | 66 for url in page_urls: |
| 67 ps.AddUserStory(page_module.Page( | 67 ps.AddUserStory(page_module.Page( |
| 68 url, ps, ps.base_dir, | 68 url, ps, ps.base_dir, |
| 69 shared_page_state_class=shared_page_state_class)) | 69 shared_page_state_class=shared_page_state_class)) |
| 70 return ps | 70 return ps |
| 71 | 71 |
| 72 | 72 |
| 73 class _BlinkPerfMeasurement(page_test.PageTest): | 73 class _BlinkPerfMeasurement(page_test.PageTest): |
| 74 """Tuns a blink performance test and reports the results.""" | 74 """Tuns a blink performance test and reports the results.""" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 tag = 'xml_http_request' | 314 tag = 'xml_http_request' |
| 315 test = _BlinkPerfMeasurement | 315 test = _BlinkPerfMeasurement |
| 316 | 316 |
| 317 @classmethod | 317 @classmethod |
| 318 def Name(cls): | 318 def Name(cls): |
| 319 return 'blink_perf.xml_http_request' | 319 return 'blink_perf.xml_http_request' |
| 320 | 320 |
| 321 def CreatePageSet(self, options): | 321 def CreatePageSet(self, options): |
| 322 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest') | 322 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest') |
| 323 return CreatePageSetFromPath(path, SKIPPED_FILE) | 323 return CreatePageSetFromPath(path, SKIPPED_FILE) |
| OLD | NEW |