Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903908

JMH: Helpful message when benchmark builds are misconfigured

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • tools
    • None
    • jmh

      When JMH benchmark project is misconfigured, the runner would print an unhelpful error like:

      ```
      Exception in thread "main" java.lang.RuntimeException: ERROR: Unable to find the resource: /META-INF/BenchmarkList
      at org.openjdk.jmh.runner.AbstractResourceReader.getReaders(AbstractResourceReader.java:98)
      at org.openjdk.jmh.runner.BenchmarkList.find(BenchmarkList.java:124)
      at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:252)
      at org.openjdk.jmh.runner.Runner.run(Runner.java:208)
      at org.openjdk.jmh.Main.main(Main.java:71)
      ```

      This is especially often when JDK 23 disabled annotation processors by default. We need to print more helpful message to guide users to resolution.

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: