[pypy-svn] r72184 - pypy/benchmarks

fijal at codespeak.net fijal at codespeak.net
Fri Mar 12 21:03:25 CET 2010


Author: fijal
Date: Fri Mar 12 21:03:16 2010
New Revision: 72184

Modified:
   pypy/benchmarks/runner.py
Log:
Add a --fast option


Modified: pypy/benchmarks/runner.py
==============================================================================
--- pypy/benchmarks/runner.py	(original)
+++ pypy/benchmarks/runner.py	Fri Mar 12 21:03:16 2010
@@ -11,11 +11,13 @@
         
 def run_and_store(benchmark_set, result_filename, pypy_c_path, revision=0,
                   options='', branch='trunk', args='', upload=False,
-                  force_host=None):
+                  force_host=None, fast=False):
     funcs = perf.BENCH_FUNCS.copy()
     funcs.update(perf._FindAllBenchmarks(benchmarks.__dict__))
     opts = ['-b', ','.join(benchmark_set), '--inherit_env=PATH',
             '--no_charts']
+    if fast:
+        opts += ['--fast']
     if args:
         opts += ['--args', args]
     opts += [sys.executable, pypy_c_path]
@@ -82,6 +84,8 @@
                       help="Upload results to speed.pypy.org")
     parser.add_option("--force-host", default=None, action="store",
                       help="Force the hostname")
+    parser.add_option("--fast", default=False, action="store_true",
+                      help="Run shorter benchmark runs")
     options, args = parser.parse_args(argv)
     benchmarks = options.benchmarks.split(',')
     for benchmark in benchmarks:
@@ -89,7 +93,7 @@
             raise WrongBenchmark(benchmark)
     run_and_store(benchmarks, options.output_filename, options.pypy_c,
                   options.revision, args=options.args, upload=options.upload,
-                  force_host=options.force_host)
+                  force_host=options.force_host, fast=options.fast)
 
 if __name__ == '__main__':
     main(sys.argv[1:])



More information about the Pypy-commit mailing list