Record Class ReportConfiguration

java.lang.Object
java.lang.Record
de.cuioss.benchmarking.common.config.ReportConfiguration

public record ReportConfiguration(BenchmarkType benchmarkType, String throughputBenchmarkName, String latencyBenchmarkName, String resultsDirectory, String resultFile, org.openjdk.jmh.results.format.ResultFormatType resultFormat, String projectName) extends Record
Configuration for benchmark report generation. Contains all report-specific settings that control how benchmark results are processed and presented.

Example usage:


 var reportConfig = ReportConfiguration.builder()
     .withBenchmarkType(BenchmarkType.MICRO)
     .withThroughputBenchmarkName("measureThroughput")
     .withLatencyBenchmarkName("measureAverageTime")
     .withResultsDirectory("target/benchmark-results")
     .build();
 
  • Constructor Details

    • ReportConfiguration

      public ReportConfiguration(BenchmarkType benchmarkType, String throughputBenchmarkName, String latencyBenchmarkName, String resultsDirectory, String resultFile, org.openjdk.jmh.results.format.ResultFormatType resultFormat, String projectName)
      Creates an instance of a ReportConfiguration record class.
      Parameters:
      benchmarkType - the value for the benchmarkType record component
      throughputBenchmarkName - the value for the throughputBenchmarkName record component
      latencyBenchmarkName - the value for the latencyBenchmarkName record component
      resultsDirectory - the value for the resultsDirectory record component
      resultFile - the value for the resultFile record component
      resultFormat - the value for the resultFormat record component
      projectName - the value for the projectName record component
  • Method Details

    • builder

      Creates a builder with default values.
      Returns:
      a new builder with default values
    • toBuilder

      Creates a builder from this configuration.
      Returns:
      a new builder initialized with this configuration's values
    • getOrCreateResultFile

      Gets the result file path, generating one if not explicitly set. Creates the results directory if it doesn't exist.
      Returns:
      the result file path
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • benchmarkType

      Returns the value of the benchmarkType record component.
      Returns:
      the value of the benchmarkType record component
    • throughputBenchmarkName

      Returns the value of the throughputBenchmarkName record component.
      Returns:
      the value of the throughputBenchmarkName record component
    • latencyBenchmarkName

      Returns the value of the latencyBenchmarkName record component.
      Returns:
      the value of the latencyBenchmarkName record component
    • resultsDirectory

      Returns the value of the resultsDirectory record component.
      Returns:
      the value of the resultsDirectory record component
    • resultFile

      public String resultFile()
      Returns the value of the resultFile record component.
      Returns:
      the value of the resultFile record component
    • resultFormat

      public org.openjdk.jmh.results.format.ResultFormatType resultFormat()
      Returns the value of the resultFormat record component.
      Returns:
      the value of the resultFormat record component
    • projectName

      public String projectName()
      Returns the value of the projectName record component.
      Returns:
      the value of the projectName record component