Commit 6a978055 authored by Mikhail Khokhlov's avatar Mikhail Khokhlov Committed by Commit Bot

[tools/perf] Enable histograms/csv/html formats in Results Processor

This CL enables processing of all supported formats by Results
Processor instead of Telemetry.

Bug: 981349
Change-Id: I5bbbb09002babbe9122f55914922ef0340a36bd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864677
Commit-Queue: Mikhail Khokhlov <khokhlov@google.com>
Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707315}
parent 3b14605a
......@@ -20,7 +20,7 @@ from core.results_processor import formatters
# These formats are always handled natively, and never handed over to Telemetry.
HANDLED_NATIVELY = ['none', 'json-test-results']
HANDLED_NATIVELY = ['none', 'json-test-results', 'histograms', 'html', 'csv']
def ArgumentParser(standalone=False, legacy_formats=None):
......@@ -131,25 +131,11 @@ def ProcessOptions(options, standalone=False):
else:
chosen_formats = ['html']
# The following is a temporary hack to switch on native handling of output
# formats for several benchmarks. This is an experiment to make sure
# that Results Processor is ready to handle output on all platforms.
# TODO(crbug.com/981349): Remove this after experiment is finished (i.e.
# all formats are considered HANDLED_NATIVELY).
force_native = False
if 'positional_args' in options.__dict__ and options.positional_args:
benchmark_name = options.positional_args[0]
if benchmark_name in ['power.desktop', 'startup.mobile', 'jetstream2',
'octane', 'blink_perf.css']:
force_native = True
logging.warning('Force native handling of output formats for %s',
benchmark_name)
options.output_formats = []
for output_format in chosen_formats:
if output_format == 'none':
continue
elif standalone or output_format in HANDLED_NATIVELY or force_native:
elif standalone or output_format in HANDLED_NATIVELY:
options.output_formats.append(output_format)
else:
options.legacy_output_formats.append(output_format)
......
......@@ -124,10 +124,9 @@ class TestProcessOptions(ProcessOptionsTestCase):
self.assertEqual(options.upload_bucket, 'some-special-bucket')
def testDefaultOutputFormat(self):
self.legacy_formats = ['html']
options = self.ParseArgs([])
self.assertEqual(options.output_formats, [])
self.assertEqual(options.legacy_output_formats, ['html'])
self.assertEqual(options.output_formats, ['html'])
self.assertEqual(options.legacy_output_formats, [])
def testUnkownOutputFormatRaises(self):
with self.assertRaises(SystemExit):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment