Class JmhResultConverter

java.lang.Object
software.amazon.awssdk.benchmark.serde.JmhResultConverter

public final class JmhResultConverter extends Object
Converts JMH result JSON (produced by -rf json -rff results.json) into the cross-language output schema format for serde benchmark comparison.

JMH SampleTime mode results contain:

  • primaryMetric.score → mean (in nanoseconds with @OutputTimeUnit(NANOSECONDS))
  • primaryMetric.scoreError → std_dev approximation
  • primaryMetric.scorePercentiles → p50, p90, p95, p99
  • measurementIterations → n

The test case ID is extracted from the params.testCaseId field of each benchmark result.

  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    convert(String inputPath, String outputPrefix)
    Read JMH results from inputPath, convert to the cross-language output schema, and write both JSON and Markdown files using the given output prefix.
    static void
    main(String[] args)
    Main entry point for command-line usage:

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • convert

      public static void convert(String inputPath, String outputPrefix)
      Read JMH results from inputPath, convert to the cross-language output schema, and write both JSON and Markdown files using the given output prefix.

      Produces two files: <outputPrefix>.json and <outputPrefix>.md.

      Parameters:
      inputPath - path to the JMH JSON result file
      outputPrefix - path prefix for output files (without extension)
    • main

      public static void main(String[] args)
      Main entry point for command-line usage:
         java -cp benchmarks.jar \
           software.amazon.awssdk.benchmark.serde.JmhResultConverter <input.json> <output-prefix>
       

      Produces <output-prefix>.json and <output-prefix>.md.