Package com.tnsai.evaluation.model
Record Class BenchmarkResult
java.lang.Object
java.lang.Record
com.tnsai.evaluation.model.BenchmarkResult
public record BenchmarkResult(String datasetName, String runId, Instant startTime, Instant endTime, List<BenchmarkResult.TestCaseResult> caseResults, Map<String,Double> aggregateScores)
extends Record
Aggregated result of running a benchmark dataset.
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult for a single test case within a benchmark run. -
Constructor Summary
ConstructorsConstructorDescriptionBenchmarkResult(String datasetName, String runId, Instant startTime, Instant endTime, List<BenchmarkResult.TestCaseResult> caseResults, Map<String, Double> aggregateScores) Creates an instance of aBenchmarkResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaggregateScoresrecord component.Returns the value of thecaseResultsrecord component.Returns the value of thedatasetNamerecord component.duration()endTime()Returns the value of theendTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longpassedCases(double threshold) doublepassRate(double threshold) runId()Returns the value of therunIdrecord component.Returns the value of thestartTimerecord component.final StringtoString()Returns a string representation of this record class.int
-
Constructor Details
-
BenchmarkResult
public BenchmarkResult(String datasetName, String runId, Instant startTime, Instant endTime, List<BenchmarkResult.TestCaseResult> caseResults, Map<String, Double> aggregateScores) Creates an instance of aBenchmarkResultrecord class.- Parameters:
datasetName- the value for thedatasetNamerecord componentrunId- the value for therunIdrecord componentstartTime- the value for thestartTimerecord componentendTime- the value for theendTimerecord componentcaseResults- the value for thecaseResultsrecord componentaggregateScores- the value for theaggregateScoresrecord component
-
-
Method Details
-
duration
-
totalCases
public int totalCases() -
passedCases
public long passedCases(double threshold) -
passRate
public double passRate(double threshold) -
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
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. -
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). -
datasetName
Returns the value of thedatasetNamerecord component.- Returns:
- the value of the
datasetNamerecord component
-
runId
Returns the value of therunIdrecord component.- Returns:
- the value of the
runIdrecord component
-
startTime
Returns the value of thestartTimerecord component.- Returns:
- the value of the
startTimerecord component
-
endTime
Returns the value of theendTimerecord component.- Returns:
- the value of the
endTimerecord component
-
caseResults
Returns the value of thecaseResultsrecord component.- Returns:
- the value of the
caseResultsrecord component
-
aggregateScores
Returns the value of theaggregateScoresrecord component.- Returns:
- the value of the
aggregateScoresrecord component
-