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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for ReportConfiguration. -
Constructor Summary
ConstructorsConstructorDescriptionReportConfiguration(BenchmarkType benchmarkType, String throughputBenchmarkName, String latencyBenchmarkName, String resultsDirectory, String resultFile, org.openjdk.jmh.results.format.ResultFormatType resultFormat, String projectName) Creates an instance of aReportConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebenchmarkTyperecord component.static ReportConfiguration.Builderbuilder()Creates a builder with default values.final booleanIndicates whether some other object is "equal to" this one.Gets the result file path, generating one if not explicitly set.final inthashCode()Returns a hash code value for this object.Returns the value of thelatencyBenchmarkNamerecord component.Returns the value of theprojectNamerecord component.Returns the value of theresultFilerecord component.org.openjdk.jmh.results.format.ResultFormatTypeReturns the value of theresultFormatrecord component.Returns the value of theresultsDirectoryrecord component.Returns the value of thethroughputBenchmarkNamerecord component.Creates a builder from this configuration.final StringtoString()Returns a string representation of this record class.
-
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 aReportConfigurationrecord class.- Parameters:
benchmarkType- the value for thebenchmarkTyperecord componentthroughputBenchmarkName- the value for thethroughputBenchmarkNamerecord componentlatencyBenchmarkName- the value for thelatencyBenchmarkNamerecord componentresultsDirectory- the value for theresultsDirectoryrecord componentresultFile- the value for theresultFilerecord componentresultFormat- the value for theresultFormatrecord componentprojectName- the value for theprojectNamerecord 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
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. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
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 withObjects::equals(Object,Object). -
benchmarkType
Returns the value of thebenchmarkTyperecord component.- Returns:
- the value of the
benchmarkTyperecord component
-
throughputBenchmarkName
Returns the value of thethroughputBenchmarkNamerecord component.- Returns:
- the value of the
throughputBenchmarkNamerecord component
-
latencyBenchmarkName
Returns the value of thelatencyBenchmarkNamerecord component.- Returns:
- the value of the
latencyBenchmarkNamerecord component
-
resultsDirectory
Returns the value of theresultsDirectoryrecord component.- Returns:
- the value of the
resultsDirectoryrecord component
-
resultFile
Returns the value of theresultFilerecord component.- Returns:
- the value of the
resultFilerecord component
-
resultFormat
Returns the value of theresultFormatrecord component.- Returns:
- the value of the
resultFormatrecord component
-
projectName
Returns the value of theprojectNamerecord component.- Returns:
- the value of the
projectNamerecord component
-