aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skpbench/skpbench.py
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-09-28 13:56:01 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-28 13:56:01 -0700
commit037adf34f5f00e5806b09b202c96cac5c0a5da0a (patch)
tree128e54daab2e8f2ab164d55ad85e10be595de7ee /tools/skpbench/skpbench.py
parent79523901c9f5c753b515349748ea8fa3a32e793d (diff)
skpbench: run for a fixed duration
Runs for a fixed amount of time instead of a fixed amount of samples. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2374093002 Review-Url: https://codereview.chromium.org/2374093002
Diffstat (limited to 'tools/skpbench/skpbench.py')
-rwxr-xr-xtools/skpbench/skpbench.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/skpbench/skpbench.py b/tools/skpbench/skpbench.py
index 320cdc1bd3..b611193876 100755
--- a/tools/skpbench/skpbench.py
+++ b/tools/skpbench/skpbench.py
@@ -44,10 +44,10 @@ __argparse.add_argument('-w','--write-path',
help="directory to save .png proofs to disk.")
__argparse.add_argument('-v','--verbosity',
type=int, default=1, help="level of verbosity (0=none to 5=debug)")
-__argparse.add_argument('-n', '--samples',
- type=int, help="number of samples to collect for each bench")
-__argparse.add_argument('-d', '--sample-ms',
- type=int, help="duration of each sample")
+__argparse.add_argument('-d', '--duration',
+ type=int, help="number of milliseconds to run each benchmark")
+__argparse.add_argument('-l', '--sample-ms',
+ type=int, help="minimum duration of a sample")
__argparse.add_argument('--fps',
action='store_true', help="use fps instead of ms")
__argparse.add_argument('-c', '--config',
@@ -89,8 +89,8 @@ class SubprocessMonitor(Thread):
class SKPBench:
ARGV = ['skpbench', '--verbosity', str(FLAGS.verbosity)]
- if FLAGS.samples:
- ARGV.extend(['--samples', str(FLAGS.samples)])
+ if FLAGS.duration:
+ ARGV.extend(['--duration', str(FLAGS.duration)])
if FLAGS.sample_ms:
ARGV.extend(['--sampleMs', str(FLAGS.sample_ms)])
if FLAGS.fps:
@@ -105,7 +105,7 @@ class SKPBench:
@classmethod
def print_header(cls):
- subprocess.call(cls.ARGV + ['--samples', '0'])
+ subprocess.call(cls.ARGV + ['--duration', '0'])
def __init__(self, skp, config, max_stddev, best_result=None):
self.skp = skp