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
FieldsModifier and TypeFieldDescriptionprivate final CommitProcessTimeThe field for thefastestrecord component.private final CommitProcessTimeThe field for themedianrecord component.private final longThe field for thenumMeasuredCommitsrecord component.private final CommitProcessTimeThe field for theslowestrecord component.private final longThe field for thetotalTimeMSrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAutomationResult(long numMeasuredCommits, long totalTimeMS, CommitProcessTime fastest, CommitProcessTime slowest, CommitProcessTime median) Creates an instance of aAutomationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublefinal booleanIndicates whether some other object is "equal to" this one.fastest()Returns the value of thefastestrecord component.final inthashCode()Returns a hash code value for this object.median()Returns the value of themedianrecord component.longReturns the value of thenumMeasuredCommitsrecord component.org.variantsync.functjonal.category.InplaceSemigroup<AutomationResult> Metadata should be composable.voidsetFromSnapshot(LinkedHashMap<String, String> snap) slowest()Returns the value of theslowestrecord 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.doublelongReturns the value of thetotalTimeMSrecord component.
-
Field Details
-
numMeasuredCommits
private final long numMeasuredCommitsThe field for thenumMeasuredCommitsrecord component. -
totalTimeMS
private final long totalTimeMSThe field for thetotalTimeMSrecord component. -
fastest
The field for thefastestrecord component. -
slowest
The field for theslowestrecord component. -
median
The field for themedianrecord component.
-
-
Constructor Details
-
AutomationResult
public AutomationResult(long numMeasuredCommits, long totalTimeMS, CommitProcessTime fastest, CommitProcessTime slowest, CommitProcessTime median) Creates an instance of aAutomationResultrecord class.- Parameters:
numMeasuredCommits- the value for thenumMeasuredCommitsrecord componenttotalTimeMS- the value for thetotalTimeMSrecord componentfastest- the value for thefastestrecord componentslowest- the value for theslowestrecord componentmedian- the value for themedianrecord 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:MetadataCreate a key-value store of the metadata that can be used for serialization.- Specified by:
snapshotin 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:
setFromSnapshotin interfaceMetadata<AutomationResult>
-
semigroup
Description copied from interface:MetadataMetadata should be composable. Composition should be inplace to optimize performance.- Specified by:
semigroupin 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 thenumMeasuredCommitsrecord component.- Returns:
- the value of the
numMeasuredCommitsrecord component
-
totalTimeMS
public long totalTimeMS()Returns the value of thetotalTimeMSrecord component.- Returns:
- the value of the
totalTimeMSrecord component
-
fastest
Returns the value of thefastestrecord component.- Returns:
- the value of the
fastestrecord component
-
slowest
Returns the value of theslowestrecord component.- Returns:
- the value of the
slowestrecord component
-
median
Returns the value of themedianrecord component.- Returns:
- the value of the
medianrecord component
-