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

Side by Side Diff: telemetry/telemetry/internal/results/results_options.py

Issue 3004493002: Make Telemetry produce CSV, JSON, and HTML by default. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 codecs 5 import codecs
6 import optparse 6 import optparse
7 import os 7 import os
8 import sys 8 import sys
9 import time 9 import time
10 10
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 43
44 def AddResultsOptions(parser): 44 def AddResultsOptions(parser):
45 group = optparse.OptionGroup(parser, 'Results options') 45 group = optparse.OptionGroup(parser, 'Results options')
46 group.add_option( 46 group.add_option(
47 '--output-format', 47 '--output-format',
48 action='append', 48 action='append',
49 dest='output_formats', 49 dest='output_formats',
50 choices=_OUTPUT_FORMAT_CHOICES, 50 choices=_OUTPUT_FORMAT_CHOICES,
51 default=[], 51 default=['csv', 'json', 'html'],
52 help='Output format. Defaults to "%%default". ' 52 help='Output format. Defaults to "%%default". '
53 'Can be %s.' % ', '.join(_OUTPUT_FORMAT_CHOICES)) 53 'Can be %s.' % ', '.join(_OUTPUT_FORMAT_CHOICES))
54 group.add_option( 54 group.add_option(
55 '-o', 55 '-o',
56 '--output', 56 '--output',
57 dest='output_file', 57 dest='output_file',
58 default=None, 58 default=None,
59 help='Redirects output to a file. Defaults to stdout.') 59 help='Redirects output to a file. Defaults to stdout.')
60 group.add_option( 60 group.add_option(
61 '--output-dir', 61 '--output-dir',
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 output_dir=options.output_dir, 198 output_dir=options.output_dir,
199 value_can_be_added_predicate=value_can_be_added_predicate, 199 value_can_be_added_predicate=value_can_be_added_predicate,
200 benchmark_enabled=benchmark_enabled) 200 benchmark_enabled=benchmark_enabled)
201 201
202 results.telemetry_info.benchmark_name = benchmark_metadata.name 202 results.telemetry_info.benchmark_name = benchmark_metadata.name
203 results.telemetry_info.benchmark_start_epoch = time.time() 203 results.telemetry_info.benchmark_start_epoch = time.time()
204 if options.results_label: 204 if options.results_label:
205 results.telemetry_info.label = options.results_label 205 results.telemetry_info.label = options.results_label
206 206
207 return results 207 return results
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698