Commit e7f5a040 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[tools] Standalone script for generating comparison of tools/run_perf.py results.

Inspired by bsuite/compare-baseline.py and tools/perf-to-html.py. The main difference
from the latter is that the new script does not require json files preprocessing and it
is able to compare multiple json files at once (just like bsuite/compare-baseline.py).

This CL also makes tools/run_perf.py relative path friendly.

BUG=

Change-Id: I7be796fa920f8360703806f32767b992eec0f9c2
Reviewed-on: https://chromium-review.googlesource.com/456286Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43982}
parent e538b70e
This diff is collapsed.
...@@ -1039,7 +1039,8 @@ def Main(args): ...@@ -1039,7 +1039,8 @@ def Main(args):
if options.outdir_no_patch: if options.outdir_no_patch:
print "specify either binary-override-path or outdir-no-patch" print "specify either binary-override-path or outdir-no-patch"
return 1 return 1
options.shell_dir = os.path.dirname(options.binary_override_path) options.shell_dir = os.path.abspath(
os.path.dirname(options.binary_override_path))
default_binary_name = os.path.basename(options.binary_override_path) default_binary_name = os.path.basename(options.binary_override_path)
if options.outdir_no_patch: if options.outdir_no_patch:
...@@ -1048,6 +1049,17 @@ def Main(args): ...@@ -1048,6 +1049,17 @@ def Main(args):
else: else:
options.shell_dir_no_patch = None options.shell_dir_no_patch = None
if options.json_test_results:
options.json_test_results = os.path.abspath(options.json_test_results)
if options.json_test_results_no_patch:
options.json_test_results_no_patch = os.path.abspath(
options.json_test_results_no_patch)
# Ensure all arguments have absolute path before we start changing current
# directory.
args = map(os.path.abspath, args)
prev_aslr = None prev_aslr = None
prev_cpu_gov = None prev_cpu_gov = None
platform = Platform.GetPlatform(options) platform = Platform.GetPlatform(options)
...@@ -1057,8 +1069,6 @@ def Main(args): ...@@ -1057,8 +1069,6 @@ def Main(args):
with CustomMachineConfiguration(governor = options.cpu_governor, with CustomMachineConfiguration(governor = options.cpu_governor,
disable_aslr = options.noaslr) as conf: disable_aslr = options.noaslr) as conf:
for path in args: for path in args:
path = os.path.abspath(path)
if not os.path.exists(path): # pragma: no cover if not os.path.exists(path): # pragma: no cover
results.errors.append("Configuration file %s does not exist." % path) results.errors.append("Configuration file %s does not exist." % path)
continue continue
......
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