# HG changeset patch # User Gilles Duboscq # Date 1392307400 -3600 # Node ID f694daada5bf93197b169b15b3556efb67b3bc1b # Parent 69928d77bc0a76b6d4e93a496f275792957b5e1b mx jmh: display the number of benchmarks that will run diff -r 69928d77bc0a -r f694daada5bf mx/mx_graal.py --- a/mx/mx_graal.py Thu Feb 13 15:39:18 2014 +0100 +++ b/mx/mx_graal.py Thu Feb 13 17:03:20 2014 +0100 @@ -1281,6 +1281,7 @@ mx.run(['mvn', 'package'], cwd = jmhPath, out = _blackhole) matchedSuites = set() + numBench = [0] for micros in os.listdir(jmhPath): absoluteMicro = os.path.join(jmhPath, micros) if not os.path.isdir(absoluteMicro): @@ -1302,6 +1303,7 @@ match = match or (b in x) if match: + numBench[0] += 1 matchedSuites.add(micros) @@ -1310,6 +1312,9 @@ matchedSuites.add(micros) mx.logv("matchedSuites: " + str(matchedSuites)) + plural = 's' if not benchmarks or numBench[0] > 1 else '' + number = str(numBench[0]) if benchmarks else "all" + mx.log("Running " + number + " benchmark" + plural + '...') regex = [] if benchmarks: