diff options
author | Yuqian Li <liyuqian@google.com> | 2018-01-05 11:13:43 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-05 18:13:36 +0000 |
commit | 4a577af2d8b177fef873acdfc1915e4f09e3614d (patch) | |
tree | e22884f72b2eeea069c3a46b6b19ef7a9981049e /tools/calmbench | |
parent | f5404bbcf49dbb3b0799cb6bd647c9a2ea14bea4 (diff) |
Separate compile task from calmbench task
Bug: skia:7344
Change-Id: I019fe5e3178d13ccf3a510bdcf1c81915149def5
Reviewed-on: https://skia-review.googlesource.com/89900
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'tools/calmbench')
-rw-r--r-- | tools/calmbench/ab.py | 7 | ||||
-rw-r--r-- | tools/calmbench/calmbench.py | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/calmbench/ab.py b/tools/calmbench/ab.py index b5b5c8d5e1..22c28e23f0 100644 --- a/tools/calmbench/ab.py +++ b/tools/calmbench/ab.py @@ -28,6 +28,7 @@ import time import json import subprocess import shlex +import multiprocessing from argparse import ArgumentParser from multiprocessing import Process from threading import Thread @@ -58,7 +59,6 @@ timesB = {} def parse_args(): parser = ArgumentParser(description=HELP) - parser.add_argument('skiadir', type=str, help="skia directory") parser.add_argument('outdir', type=str, help="output directory") parser.add_argument('a', type=str, help="name of A") parser.add_argument('b', type=str, help="name of B") @@ -87,6 +87,11 @@ def parse_args(): args.skip_b = args.skip_b == "true" args.noinit = args.noinit == "true" + if args.threads == -1: + args.threads = 1 + if args.config in ["8888", "565"]: # multi-thread for CPU only + args.threads = max(1, multiprocessing.cpu_count() / 2) + return args def append_dict_sorted_array(dict_array, key, value): diff --git a/tools/calmbench/calmbench.py b/tools/calmbench/calmbench.py index 6ddd96b5e1..3459a34e2e 100644 --- a/tools/calmbench/calmbench.py +++ b/tools/calmbench/calmbench.py @@ -181,7 +181,6 @@ def main(): command = [ 'python', temp_ab_name, - args.skiadir, args.writedir, args.branch + ("_A" if args.branch == args.baseline else ""), args.baseline + ("_B" if args.branch == args.baseline else ""), |