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

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

Issue 429043002: Make JSON output formatter output to a file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Misc fixes Created 6 years, 4 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 | « tools/telemetry/telemetry/results/json_output_formatter.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/results/results_options.py
diff --git a/tools/telemetry/telemetry/results/results_options.py b/tools/telemetry/telemetry/results/results_options.py
index 1d330cfb69455b5ac2af7d21fefdc10887858aa1..af20d58524877de25918a76d3aa0fa8c2d94f686 100644
--- a/tools/telemetry/telemetry/results/results_options.py
+++ b/tools/telemetry/telemetry/results/results_options.py
@@ -49,6 +49,8 @@ def CreateResults(metadata, options):
# Maybe we should have --output-dir instead of --output-file?
if options.output_format == 'html' and not options.output_file:
options.output_file = os.path.join(util.GetBaseDir(), 'results.html')
+ elif options.output_format == 'json' and not options.output_file:
+ options.output_file = os.path.join(util.GetBaseDir(), 'results.json')
if hasattr(options, 'output_file') and options.output_file:
output_file = os.path.expanduser(options.output_file)
@@ -89,8 +91,8 @@ def CreateResults(metadata, options):
options.upload_results, options.browser_type,
options.results_label, trace_tag=options.output_trace_tag))
elif options.output_format == 'json':
- output_formatters.append(json_output_formatter.JsonOutputFormatter(
- output_stream, metadata))
+ output_formatters.append(
+ json_output_formatter.JsonOutputFormatter(output_stream, metadata))
else:
# Should never be reached. The parser enforces the choices.
raise Exception('Invalid --output-format "%s". Valid choices are: %s'
« no previous file with comments | « tools/telemetry/telemetry/results/json_output_formatter.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698