class_docstr: Run a Java Micro Benchmark Harness
  
  This assumes the binary supports the standard command line options,
  notably `-Dbenchmark_filter`
class_docstr_tok: ["Run","a","Java","Micro","Benchmark","Harness","This","assumes","the","binary","supports","the","standard","command","line","options",",","notably","`","-Dbenchmark_filter","`"]
code: def list_benchmarks(self):
      argv = []
      if self.benchmark_filter:
          argv.append(
              "-Dbenchmark.filter={}".format(self.benchmark_filter)
          )
      result = self.build.list(
          *argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE
      )
  
      lists = []
      benchmarks = False
      for line in str.splitlines(result.stdout.decode("utf-8")):
          if not benchmarks:
              if line.startswith("Benchmarks:"):
                  benchmarks = True
          else:
              if line.startswith("org.apache.arrow"):
                  lists.append(line)
              if line.startswith("[INFO]"):
                  break
      return lists
  
imports: from itertools import filterfalse, groupby, tee
  import json
  import subprocess
  from tempfile import NamedTemporaryFile
  from .core import Benchmark
  from ..utils.command import Command
  from ..utils.maven import Maven
label_desc: Use image node_id 2 for calling the JavaMicrobenchmarkHarnessCommand obj's underlying member method code with example usage: obj.list_benchmarks() and returns: lists