Commits

Antoine Pitrou  committed 670759f

Skip slow benchmarks (hexiom2) in fast mode except when explicitly selected.

  • Participants
  • Parent commits 17cf5ea

Comments (0)

Files changed (1)

                 "py3k": ["2to3", "2n3", "chameleon", "mako_v2"]
                }
 
+SLOW_BENCHMARKS = ["hexiom2"]
+
 
 def _ExpandBenchmarkName(bm_name, bench_groups):
     """Recursively expand name benchmark names.
         yield bm_name
 
 
-def ParseBenchmarksOption(benchmarks_opt, bench_groups):
+def ParseBenchmarksOption(benchmarks_opt, bench_groups, fast=False):
     """Parses and verifies the --benchmarks option.
 
     Args:
             logging.warning("No benchmark named %s", bm)
         else:
             should_run.remove(bm)
+    if fast:
+        # In fast mode, skip slow benchmarks that weren't explicitly selected
+        # on the command line.
+        to_skip = (should_run - positive_benchmarks) & set(SLOW_BENCHMARKS)
+        if to_skip:
+            logging.info("Skipping slow benchmarks (%s) in fast mode",
+                         ', '.join(sorted(to_skip)))
+        should_run = should_run - to_skip
     return should_run
 
 
     if options.diff_instrumentation:
         info("Suppressing performance data due to --diff_instrumentation")
 
-    should_run = ParseBenchmarksOption(options.benchmarks, bench_groups)
+    should_run = ParseBenchmarksOption(options.benchmarks, bench_groups,
+                                       options.fast)
 
     results = []
     for name in sorted(should_run):