Record Class ViewEvaluation
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.experiments.views.result.ViewEvaluation
- Record Components:
commit- The commit on which views were generated.file- The file of the patch that was analysed.relevance- The relevance predicate from which the views were generated.msNaive- Milliseconds it took to generate the view with thenaive algorithmmsOptimized- Milliseconds it took to generate the view with theoptimized algorithmdiffStatistics- Various statistics on the variation diff of the analysed patch.viewStatistics- The same statistics as for the original variation diff but for the produced view.
- All Implemented Interfaces:
CSV
public record ViewEvaluation(String commit, String file, Relevance relevance, long msNaive, long msOptimized, ViewEvaluation.DiffStatistics diffStatistics, ViewEvaluation.DiffStatistics viewStatistics)
extends Record
implements CSV
Single data point in our feasibility study.
An object of this class corresponds to a row in the CSV files we export.
This row contains all information for benchmarking a single view generation:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordHolds various information of a variation diff. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thecommitrecord component.private final ViewEvaluation.DiffStatisticsThe field for thediffStatisticsrecord component.private final StringThe field for thefilerecord component.private final longThe field for themsNaiverecord component.private final longThe field for themsOptimizedrecord component.private final RelevanceThe field for therelevancerecord component.private final ViewEvaluation.DiffStatisticsThe field for theviewStatisticsrecord component.Fields inherited from interface org.variantsync.diffdetective.util.CSV
DEFAULT_CSV_DELIMITER -
Constructor Summary
ConstructorsConstructorDescriptionViewEvaluation(String commit, String file, Relevance relevance, long msNaive, long msOptimized, ViewEvaluation.DiffStatistics diffStatistics, ViewEvaluation.DiffStatistics viewStatistics) Creates an instance of aViewEvaluationrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommit()Returns the value of thecommitrecord component.Returns the value of thediffStatisticsrecord component.final booleanIndicates whether some other object is "equal to" this one.file()Returns the value of thefilerecord component.final inthashCode()Returns a hash code value for this object.static StringmakeHeader(String delimiter) Creates the header for a CSV file in which objects of this class can be rows.longmsNaive()Returns the value of themsNaiverecord component.longReturns the value of themsOptimizedrecord component.Returns the value of therelevancerecord component.Convert this value into a CSV row using a custom CSVdelimiter.final StringtoString()Returns a string representation of this record class.Returns the value of theviewStatisticsrecord component.
-
Field Details
-
commit
The field for thecommitrecord component. -
file
The field for thefilerecord component. -
relevance
The field for therelevancerecord component. -
msNaive
private final long msNaiveThe field for themsNaiverecord component. -
msOptimized
private final long msOptimizedThe field for themsOptimizedrecord component. -
diffStatistics
The field for thediffStatisticsrecord component. -
viewStatistics
The field for theviewStatisticsrecord component.
-
-
Constructor Details
-
ViewEvaluation
public ViewEvaluation(String commit, String file, Relevance relevance, long msNaive, long msOptimized, ViewEvaluation.DiffStatistics diffStatistics, ViewEvaluation.DiffStatistics viewStatistics) Creates an instance of aViewEvaluationrecord class.- Parameters:
commit- the value for thecommitrecord componentfile- the value for thefilerecord componentrelevance- the value for therelevancerecord componentmsNaive- the value for themsNaiverecord componentmsOptimized- the value for themsOptimizedrecord componentdiffStatistics- the value for thediffStatisticsrecord componentviewStatistics- the value for theviewStatisticsrecord component
-
-
Method Details
-
makeHeader
Creates the header for a CSV file in which objects of this class can be rows.- Parameters:
delimiter- The delimiter to use between rows in the CSV file (seeCSV.DEFAULT_CSV_DELIMITER.- Returns:
- A string that should be the first row in a CSV file with objects of this class as rows.
-
toCSV
Description copied from interface:CSVConvert this value into a CSV row using a custom CSVdelimiter. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
commit
Returns the value of thecommitrecord component.- Returns:
- the value of the
commitrecord component
-
file
Returns the value of thefilerecord component.- Returns:
- the value of the
filerecord component
-
relevance
Returns the value of therelevancerecord component.- Returns:
- the value of the
relevancerecord component
-
msNaive
public long msNaive()Returns the value of themsNaiverecord component.- Returns:
- the value of the
msNaiverecord component
-
msOptimized
public long msOptimized()Returns the value of themsOptimizedrecord component.- Returns:
- the value of the
msOptimizedrecord component
-
diffStatistics
Returns the value of thediffStatisticsrecord component.- Returns:
- the value of the
diffStatisticsrecord component
-
viewStatistics
Returns the value of theviewStatisticsrecord component.- Returns:
- the value of the
viewStatisticsrecord component
-