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

Unified Diff: telemetry/telemetry/internal/results/results_options.py

Issue 2064753008: Revert of [Telemetry] Remove BuildbotOutputFormatter (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « telemetry/telemetry/internal/results/buildbot_output_formatter_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/results/results_options.py
diff --git a/telemetry/telemetry/internal/results/results_options.py b/telemetry/telemetry/internal/results/results_options.py
index b5b9ade3aacd10bc7a3dabd6271d8b73c992dcdd..a58630c79f2953ecc3337382a91daf55ee4223f4 100644
--- a/telemetry/telemetry/internal/results/results_options.py
+++ b/telemetry/telemetry/internal/results/results_options.py
@@ -10,6 +10,7 @@
from catapult_base import cloud_storage # pylint: disable=import-error
from telemetry.core import util
+from telemetry.internal.results import buildbot_output_formatter
from telemetry.internal.results import chart_json_output_formatter
from telemetry.internal.results import csv_pivot_table_output_formatter
from telemetry.internal.results import gtest_progress_reporter
@@ -20,7 +21,7 @@
from telemetry.internal.results import progress_reporter
# Allowed output formats. The default is the first item in the list.
-_OUTPUT_FORMAT_CHOICES = ('html', 'html2', 'gtest', 'json',
+_OUTPUT_FORMAT_CHOICES = ('html', 'html2', 'buildbot', 'gtest', 'json',
'chartjson', 'csv-pivot-table', 'none')
@@ -49,7 +50,7 @@
group.add_option('--output-trace-tag',
default='',
help='Append a tag to the key of each result trace. Use '
- 'with html, csv-pivot-table output formats.')
+ 'with html, buildbot, csv-pivot-table output formats.')
group.add_option('--reset-results', action='store_true',
help='Delete all stored results.')
group.add_option('--upload-results', action='store_true',
@@ -88,6 +89,9 @@
assert output_format in _OUTPUT_FORMAT_CHOICES, 'Must specify a valid format.'
assert output_format not in ('gtest', 'none'), (
'Cannot set stream for \'gtest\' or \'none\' output formats.')
+
+ if output_format == 'buildbot':
+ return sys.stdout
assert output_format in _OUTPUT_FILENAME_LOOKUP, (
'No known filename for the \'%s\' output format' % output_format)
@@ -128,7 +132,19 @@
output_formatters.append(
csv_pivot_table_output_formatter.CsvPivotTableOutputFormatter(
output_stream, trace_tag=options.output_trace_tag))
+ elif output_format == 'buildbot':
+ output_formatters.append(
+ buildbot_output_formatter.BuildbotOutputFormatter(
+ output_stream, trace_tag=options.output_trace_tag))
elif output_format == 'html':
+ # TODO(chrishenry): We show buildbot output so that users can grep
+ # through the results easily without needing to open the html
+ # file. Another option for this is to output the results directly
+ # in gtest-style results (via some sort of progress reporter),
+ # as we plan to enable gtest-style output for all output formatters.
+ output_formatters.append(
+ buildbot_output_formatter.BuildbotOutputFormatter(
+ sys.stdout, trace_tag=options.output_trace_tag))
output_formatters.append(html_output_formatter.HtmlOutputFormatter(
output_stream, benchmark_metadata, options.reset_results,
options.upload_results, options.browser_type,
« no previous file with comments | « telemetry/telemetry/internal/results/buildbot_output_formatter_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698