Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: tools/telemetry/telemetry/multi_page_benchmark_runner.py

Issue 11428107: Telemetry: extends Platform abstraction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Platform API Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 import csv 5 import csv
6 import logging 6 import logging
7 import os 7 import os
8 import sys 8 import sys
9 9
10 from telemetry import all_page_interactions # pylint: disable=W0611 10 from telemetry import all_page_interactions # pylint: disable=W0611
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if options.output_format == 'csv': 69 if options.output_format == 'csv':
70 results = multi_page_benchmark.CsvBenchmarkResults(csv.writer(sys.stdout)) 70 results = multi_page_benchmark.CsvBenchmarkResults(csv.writer(sys.stdout))
71 elif options.output_format == 'terminal-block': 71 elif options.output_format == 'terminal-block':
72 results = multi_page_benchmark.TerminalBlockBenchmarkResults(sys.stdout) 72 results = multi_page_benchmark.TerminalBlockBenchmarkResults(sys.stdout)
73 else: 73 else:
74 raise Exception('Invalid --output-format value: "%s". Valid values are ' 74 raise Exception('Invalid --output-format value: "%s". Valid values are '
75 '"csv" and "terminal-block".' 75 '"csv" and "terminal-block".'
76 % options.output_format) 76 % options.output_format)
77 77
78 with page_runner.PageRunner(ps) as runner: 78 with page_runner.PageRunner(ps) as runner:
79 runner.Run(options, possible_browser, benchmark, results) 79 runner.Run(options, possible_browser, benchmark, results)
nduca 2012/12/07 18:12:06 pass in performance_test=True to runner or put on
bulach 2012/12/07 20:45:53 Done as an option
80
80 # When using an exact executable, assume it is a reference build for the 81 # When using an exact executable, assume it is a reference build for the
81 # purpose of outputting the perf results. 82 # purpose of outputting the perf results.
82 results.PrintSummary(options.browser_executable and '_ref' or '') 83 results.PrintSummary(options.browser_executable and '_ref' or '')
83 84
84 if len(results.page_failures): 85 if len(results.page_failures):
85 logging.warning('Failed pages: %s', '\n'.join( 86 logging.warning('Failed pages: %s', '\n'.join(
86 [failure['page'].url for failure in results.page_failures])) 87 [failure['page'].url for failure in results.page_failures]))
87 88
88 if len(results.skipped_pages): 89 if len(results.skipped_pages):
89 logging.warning('Skipped pages: %s', '\n'.join( 90 logging.warning('Skipped pages: %s', '\n'.join(
90 [skipped['page'].url for skipped in results.skipped_pages])) 91 [skipped['page'].url for skipped in results.skipped_pages]))
91 return min(255, len(results.page_failures)) 92 return min(255, len(results.page_failures))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698