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

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

Issue 551973002: [Telemetry] Make --chartjson output chart.json instead of to stdout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Ned's comments Created 6 years, 3 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/chart_json_unittest.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 42b3ac2ee9deaf8d5a9655ca07a227c84b9838dd..f7501d282bc8585d6f2c339a18e387537ff27f79 100644
--- a/tools/telemetry/telemetry/results/results_options.py
+++ b/tools/telemetry/telemetry/results/results_options.py
@@ -8,6 +8,7 @@ import sys
from telemetry.core import util
from telemetry.results import buildbot_output_formatter
+from telemetry.results import chart_json_output_formatter
from telemetry.results import csv_output_formatter
from telemetry.results import gtest_progress_reporter
from telemetry.results import html_output_formatter
@@ -17,7 +18,7 @@ from telemetry.results import progress_reporter
# Allowed output formats. The default is the first item in the list.
_OUTPUT_FORMAT_CHOICES = ('html', 'buildbot', 'block', 'csv', 'gtest', 'json',
- 'none')
+ 'chartjson', 'none')
def AddResultsOptions(parser):
@@ -104,6 +105,11 @@ def CreateResults(benchmark_metadata, options):
output_formatters.append(
json_output_formatter.JsonOutputFormatter(output_stream,
benchmark_metadata))
+ elif options.output_format == 'chartjson':
+ output_formatters.append(
+ chart_json_output_formatter.ChartJsonOutputFormatter(
+ output_stream,
+ benchmark_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/chart_json_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698