Class FindMedianCommitTime

java.lang.Object
org.variantsync.diffdetective.experiments.esecfse22.FindMedianCommitTime

public class FindMedianCommitTime extends Object
Program to find the median commit time after the EditClassValidation has been performed. This program will iterate through all commit times reported by the validation, load them, and find average time, median time, the fastest, and the slowest commit.
Author:
Paul Bittner
  • Field Details

    • outputFile

      public static final Path outputFile
      File to write the result to.
  • Constructor Details

    • FindMedianCommitTime

      public FindMedianCommitTime()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Main method. Expects exactly one argument: The path to the root directory of the validation output.
      Parameters:
      args - An array of size 1, containing the path to validation output is expected.
      Throws:
      IOException - when getResultOfDirectory(java.nio.file.Path) throws.
    • getResultOfDirectory

      public static AutomationResult getResultOfDirectory(Path directory) throws IOException
      Summarizes the commit time results found in the given validation output directory. The directory should point to the root of the directory in which the results of an execution of the EditClassValidation can be found.
      Parameters:
      directory - Validation output directory.
      Returns:
      Summary of commit process times with various speed statistics.
      Throws:
      IOException - when iterating the files in the given directory fails for some reason.
    • parse

      private static Stream<CommitProcessTime> parse(Path file)
      Parses all CommitProcessTimes in the given file.
      Parameters:
      file - Path to a commit times file (ending with .committimes.txt).
      Returns:
      A stream of the CommitProcessTimes in the given file.