Skip to content

JMH doesn't allow parameterized tests #141

@johnedquinn

Description

@johnedquinn

Description

  • JMH allows for parameterized tests -- see example below where queryIndex is a parameter:
Benchmark                                               (queryIndex)  Mode  Cnt        Score        Error  Units
ParserBenchmark.parseSuccess                                       0  avgt    3       15.148 ±      0.616  us/op
ParserBenchmark.parseSuccess                                       1  avgt    3       85.174 ±      4.559  us/op
...
  • The jmh tool doesn't support parameters, and all of the parameter runs get placed within a single benchmark. See below.

Screen Shot 2022-12-05 at 9 35 40 AM

- Note the same commit for all datapoints.

To Reproduce

  • Add the JMH @param annotation to the benchmark with the arguments
  • Run the GH workflow after running JMH

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions