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 algorithm
msOptimized
- Milliseconds it took to generate the view with theoptimized algorithm
diffStatistics
- 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
Modifier and TypeClassDescriptionstatic final record
Holds various information of a variation diff. -
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The field for thecommit
record component.private final ViewEvaluation.DiffStatistics
The field for thediffStatistics
record component.private final String
The field for thefile
record component.private final long
The field for themsNaive
record component.private final long
The field for themsOptimized
record component.private final Relevance
The field for therelevance
record component.private final ViewEvaluation.DiffStatistics
The field for theviewStatistics
record component.Fields inherited from interface org.variantsync.diffdetective.util.CSV
DEFAULT_CSV_DELIMITER
-
Constructor Summary
ConstructorDescriptionViewEvaluation
(String commit, String file, Relevance relevance, long msNaive, long msOptimized, ViewEvaluation.DiffStatistics diffStatistics, ViewEvaluation.DiffStatistics viewStatistics) Creates an instance of aViewEvaluation
record class. -
Method Summary
Modifier and TypeMethodDescriptioncommit()
Returns the value of thecommit
record component.Returns the value of thediffStatistics
record component.final boolean
Indicates whether some other object is "equal to" this one.file()
Returns the value of thefile
record component.final int
hashCode()
Returns a hash code value for this object.static String
makeHeader
(String delimiter) Creates the header for a CSV file in which objects of this class can be rows.long
msNaive()
Returns the value of themsNaive
record component.long
Returns the value of themsOptimized
record component.Returns the value of therelevance
record component.Convert this value into a CSV row using a custom CSVdelimiter
.final String
toString()
Returns a string representation of this record class.Returns the value of theviewStatistics
record component.
-
Field Details
-
commit
The field for thecommit
record component. -
file
The field for thefile
record component. -
relevance
The field for therelevance
record component. -
msNaive
private final long msNaiveThe field for themsNaive
record component. -
msOptimized
private final long msOptimizedThe field for themsOptimized
record component. -
diffStatistics
The field for thediffStatistics
record component. -
viewStatistics
The field for theviewStatistics
record 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 aViewEvaluation
record class.- Parameters:
commit
- the value for thecommit
record componentfile
- the value for thefile
record componentrelevance
- the value for therelevance
record componentmsNaive
- the value for themsNaive
record componentmsOptimized
- the value for themsOptimized
record componentdiffStatistics
- the value for thediffStatistics
record componentviewStatistics
- the value for theviewStatistics
record 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:CSV
Convert 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 thecommit
record component.- Returns:
- the value of the
commit
record component
-
file
Returns the value of thefile
record component.- Returns:
- the value of the
file
record component
-
relevance
Returns the value of therelevance
record component.- Returns:
- the value of the
relevance
record component
-
msNaive
public long msNaive()Returns the value of themsNaive
record component.- Returns:
- the value of the
msNaive
record component
-
msOptimized
public long msOptimized()Returns the value of themsOptimized
record component.- Returns:
- the value of the
msOptimized
record component
-
diffStatistics
Returns the value of thediffStatistics
record component.- Returns:
- the value of the
diffStatistics
record component
-
viewStatistics
Returns the value of theviewStatistics
record component.- Returns:
- the value of the
viewStatistics
record component
-