Merge "minify_tool: Fix benchmark output and rename parameter"
diff --git a/tools/minify_tool.py b/tools/minify_tool.py
index 08b2ada..787c1e1 100755
--- a/tools/minify_tool.py
+++ b/tools/minify_tool.py
@@ -9,6 +9,9 @@
 Given an input JAR (default: r8.jar) and a main-class, generates a new input JAR
 with the given main-class in the manifest along with a -keep rule for keeping
 just the main entrypoint, and runs R8 in release+classfile mode on the JAR.
+
+If --benchmark-name NAME is given, prints "<NAME>(RunTimeRaw): <elapsed> ms"
+to standard output at the end of the run.
 '''
 
 import argparse
@@ -44,8 +47,8 @@
     '-O', '--no-debug', dest='debug', action='store_false',
     help='Disable assertions when running R8')
 parser.add_argument(
-    '--print-runtimeraw', metavar='BENCHMARKNAME',
-    help='Print "<BENCHMARKNAME>(RunTimeRaw): <elapsed> ms" at the end')
+    '--benchmark-name',
+    help='Print benchmarks with the given name')
 
 def generate_output_name(input_jar, mainclass):
   if not mainclass:
@@ -83,7 +86,7 @@
     return mo.group(1)
 
 def minify_tool(mainclass=None, input_jar=utils.R8_JAR, output_jar=None, lib=RT,
-                debug=True, build=True, print_runtimeraw=None):
+                debug=True, build=True, benchmark_name=None):
   if output_jar is None:
     output_jar = generate_output_name(input_jar, mainclass)
   with utils.TempDir() as path:
@@ -104,9 +107,9 @@
             tmp_input_path)
     start_time = time.time()
     return_code = toolhelper.run('r8', args, debug=debug, build=build)
-    if print_runtimeraw:
+    if benchmark_name:
       elapsed_ms = 1000 * (time.time() - start_time)
-      print('%s-Total(RunTimeRaw): %s ms' % (print_runtimeraw, elapsed_ms))
+      print('%s(RunTimeRaw): %s ms' % (benchmark_name, elapsed_ms))
     return return_code
 
 if __name__ == '__main__':
diff --git a/tools/run_bootstrap_benchmark.py b/tools/run_bootstrap_benchmark.py
index 0c608f9..2ae97b2 100755
--- a/tools/run_bootstrap_benchmark.py
+++ b/tools/run_bootstrap_benchmark.py
@@ -14,8 +14,8 @@
 
 parser = argparse.ArgumentParser()
 parser.add_argument(
-    '--print-runtimeraw', metavar='BENCHMARKNAME',
-    help='Print "<BENCHMARKNAME>(RunTimeRaw): <elapsed> ms" at the end')
+    '--name', metavar='NAME', dest='benchmark_name',
+    help='Print "<NAME>(RunTimeRaw): <elapsed> ms" at the end')
 
 
 if __name__ == '__main__':