Package org.iam.utils

Class ResultsAnalyzer

java.lang.Object
org.iam.utils.ResultsAnalyzer

public class ResultsAnalyzer extends Object
ResultsAnalyzer collects and computes statistics for batch analysis runs.

Tracks timing, round counts, and result sizes for mining and reducing steps. Provides methods to reset statistics, add timing data, calculate averages, and write summary results to files.

Since:
2025-02-28
Author:
  • Constructor Details

    • ResultsAnalyzer

      public ResultsAnalyzer()
      Constructs a new ResultsAnalyzer and initializes all statistics.
  • Method Details

    • initializes

      public void initializes()
      Resets all statistics for a new analysis run.
    • addRound

      public void addRound()
      Increments the file round counter.
    • addMCISolvingRound

      public void addMCISolvingRound()
      Increments the solving round counter for IMiner.
    • startMeasurement

      public void startMeasurement()
      Starts a new timing measurement.
    • addMCILabelsTime

      public void addMCILabelsTime()
      Adds elapsed time to IMiner label timing and restarts measurement.
    • addMCIOperationsTime

      public void addMCIOperationsTime()
      Adds elapsed time to IMiner operation timing and restarts measurement.
    • addRRIOperationsTime

      public void addRRIOperationsTime()
      Adds elapsed time to IReducer operation timing and restarts measurement.
    • addRRIILPSolvingTime

      public void addRRIILPSolvingTime()
      Adds elapsed time to IReducer ILP solving timing and restarts measurement.
    • setNumberStatement

      public void setNumberStatement(int numberStatement)
      Sets the number of statements in the analyzed file.
    • setNumberIntentsMCI

      public void setNumberIntentsMCI(int numberIntentsMCI)
      Sets the number of IMiner intents.
    • setNumberIntentsRRI

      public void setNumberIntentsRRI(int numberIntentsRRI)
      Sets the number of IReducer intents.
    • setMCISolvingRoundAverage

      public void setMCISolvingRoundAverage(int round)
      Sets the average number of solving rounds for IMiner.
    • calculateAverage

      public void calculateAverage()
      Calculates averages for all tracked statistics.
    • writeHeaderToFile

      public void writeHeaderToFile(String filePath)
      Writes the header line to the summary output file.
      Parameters:
      filePath - the output file path
    • writeAveragesToFile

      public void writeAveragesToFile(String filePath)
      Appends the current averages to the summary output file.
      Parameters:
      filePath - the output file path