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 Details

  • Constructor Details

    • AutomationResult

      public AutomationResult(long numMeasuredCommits, long totalTimeMS, CommitProcessTime fastest, CommitProcessTime slowest, CommitProcessTime median)
      Creates an instance of a AutomationResult record class.
      Parameters:
      numMeasuredCommits - the value for the numMeasuredCommits record component
      totalTimeMS - the value for the totalTimeMS record component
      fastest - the value for the fastest record component
      slowest - the value for the slowest record component
      median - the value for the median 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

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • snapshot

      public LinkedHashMap<String,?> snapshot()
      Description copied from interface: Metadata
      Create a key-value store of the metadata that can be used for serialization.
      Specified by:
      snapshot in interface Metadata<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

      public void setFromSnapshot(LinkedHashMap<String,String> snap)
      Specified by:
      setFromSnapshot in interface Metadata<AutomationResult>
    • semigroup

      public org.variantsync.functjonal.category.InplaceSemigroup<AutomationResult> semigroup()
      Description copied from interface: Metadata
      Metadata should be composable. Composition should be inplace to optimize performance.
      Specified by:
      semigroup in interface Metadata<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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • numMeasuredCommits

      public long numMeasuredCommits()
      Returns the value of the numMeasuredCommits record component.
      Returns:
      the value of the numMeasuredCommits record component
    • totalTimeMS

      public long totalTimeMS()
      Returns the value of the totalTimeMS record component.
      Returns:
      the value of the totalTimeMS record component
    • fastest

      public CommitProcessTime fastest()
      Returns the value of the fastest record component.
      Returns:
      the value of the fastest record component
    • slowest

      public CommitProcessTime slowest()
      Returns the value of the slowest record component.
      Returns:
      the value of the slowest record component
    • median

      public CommitProcessTime median()
      Returns the value of the median record component.
      Returns:
      the value of the median record component