Record Class AutomationResult
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.analysis.AutomationResult
- Record Components:
numMeasuredCommits
- Number of measured commits.totalTimeMS
- Total time in milliseconds that it took to process the commits.fastest
- The commit that was processed that fastest.slowest
- The commit that was processed that slowest.median
- The median time it took to process a commit.
- All Implemented Interfaces:
Metadata<AutomationResult>
public record AutomationResult(long numMeasuredCommits, long totalTimeMS, CommitProcessTime fastest, CommitProcessTime slowest, CommitProcessTime median)
extends Record
implements Metadata<AutomationResult>
Statistics on runtimes for commit processing.
- Author:
- Paul Bittner
-
Field Summary
Modifier and TypeFieldDescriptionprivate final CommitProcessTime
The field for thefastest
record component.private final CommitProcessTime
The field for themedian
record component.private final long
The field for thenumMeasuredCommits
record component.private final CommitProcessTime
The field for theslowest
record component.private final long
The field for thetotalTimeMS
record component. -
Constructor Summary
ConstructorDescriptionAutomationResult
(long numMeasuredCommits, long totalTimeMS, CommitProcessTime fastest, CommitProcessTime slowest, CommitProcessTime median) Creates an instance of aAutomationResult
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
final boolean
Indicates whether some other object is "equal to" this one.fastest()
Returns the value of thefastest
record component.final int
hashCode()
Returns a hash code value for this object.median()
Returns the value of themedian
record component.long
Returns the value of thenumMeasuredCommits
record component.org.variantsync.functjonal.category.InplaceSemigroup<AutomationResult>
Metadata should be composable.void
setFromSnapshot
(LinkedHashMap<String, String> snap) slowest()
Returns the value of theslowest
record component.snapshot()
Create a key-value store of the metadata that can be used for serialization.toString()
Returns a string representation of this record class.double
long
Returns the value of thetotalTimeMS
record component.
-
Field Details
-
numMeasuredCommits
private final long numMeasuredCommitsThe field for thenumMeasuredCommits
record component. -
totalTimeMS
private final long totalTimeMSThe field for thetotalTimeMS
record component. -
fastest
The field for thefastest
record component. -
slowest
The field for theslowest
record component. -
median
The field for themedian
record component.
-
-
Constructor Details
-
AutomationResult
public AutomationResult(long numMeasuredCommits, long totalTimeMS, CommitProcessTime fastest, CommitProcessTime slowest, CommitProcessTime median) Creates an instance of aAutomationResult
record class.- Parameters:
numMeasuredCommits
- the value for thenumMeasuredCommits
record componenttotalTimeMS
- the value for thetotalTimeMS
record componentfastest
- the value for thefastest
record componentslowest
- the value for theslowest
record componentmedian
- the value for themedian
record component
-
-
Method Details
-
avgTimeMS
public double avgTimeMS()- Returns:
- The average time it took to process a commit in milliseconds.
-
totalTimeMinutes
public double totalTimeMinutes()- Returns:
- Total time in minutes that it took to process the commits.
-
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. -
snapshot
Description copied from interface:Metadata
Create a key-value store of the metadata that can be used for serialization.- Specified by:
snapshot
in interfaceMetadata<AutomationResult>
- Returns:
- A LinkedHashMap that stores all relevant properties to export. The return type has to be a LinkedHashMap to obtain insertion-order iteration.
-
setFromSnapshot
- Specified by:
setFromSnapshot
in interfaceMetadata<AutomationResult>
-
semigroup
Description copied from interface:Metadata
Metadata should be composable. Composition should be inplace to optimize performance.- Specified by:
semigroup
in interfaceMetadata<AutomationResult>
-
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 '=='. -
numMeasuredCommits
public long numMeasuredCommits()Returns the value of thenumMeasuredCommits
record component.- Returns:
- the value of the
numMeasuredCommits
record component
-
totalTimeMS
public long totalTimeMS()Returns the value of thetotalTimeMS
record component.- Returns:
- the value of the
totalTimeMS
record component
-
fastest
Returns the value of thefastest
record component.- Returns:
- the value of the
fastest
record component
-
slowest
Returns the value of theslowest
record component.- Returns:
- the value of the
slowest
record component
-
median
Returns the value of themedian
record component.- Returns:
- the value of the
median
record component
-