Class CodeStatistics

java.lang.Object
hlcd.linearCode.CodeStatistics
All Implemented Interfaces:
Serializable

public class CodeStatistics extends Object implements Serializable
The code statistics is responsible for benchmarking the statistics run of a code. It will keep track of the total time taken, the parameters of the code and the parameters of the validator used.

TODO: test finding the correct number of recursive calls needed to arrive to a solution as well as the number of potential vectors generated.

Since:
1.8
Version:
1.0 (February 2nd, 2022)
Author:
Maysara Al Jumaily
See Also:
CodeParameters, CodeValidatorParameters, Serialized Form
  • Constructor Details

    • CodeStatistics

      public CodeStatistics(CodeParameters cp, CodeValidatorParameters cvp, long recursiveCallsCount, long startTime, long endTime)
      Constructs the code statistics based on the parameters specified.
      Parameters:
      cp - the code parameters of \(\mathsf{C}\)
      cvp - the validator parameters of the code
      recursiveCallsCount - the number of recursive calls needed
      startTime - the start time of the execution of the code
      endTime - the end time of the execution of the code
  • Method Details

    • getCodeParameters

      public CodeParameters getCodeParameters()
      Returns the code parameters associated with the code.
      Returns:
      the code parameters associated with the code
    • getCodeValidatorParameters

      public CodeValidatorParameters getCodeValidatorParameters()
      Returns the code validator parameters associated with the code.
      Returns:
      the code validator parameters associated with the code
    • getRecursiveCallsCount

      public long getRecursiveCallsCount()
      Returns the number of recursive calls carried out during execution.
      Returns:
      the number of recursive calls carried out during execution
    • getStartTime

      public long getStartTime()
      Returns the start time of the execution.
      Returns:
      the start time of the execution
    • getEndTime

      public long getEndTime()
      Returns the end time of the execution.
      Returns:
      the end time of the execution
    • getTotalTime

      public long getTotalTime()
      Returns the total time of the execution as a long. It is better to use getLapsedTime() instead as it will return a human-readable format of the code's time execution.
      Returns:
      the total time of the execution as a long
      See Also:
      getLapsedTime()
    • getLapsedTime

      public String getLapsedTime()
      Returns the total time of the execution as a human-readable format. This method will probably be used a lot more often than getTotalTime(), which returns the lapsed time as a long.
      Returns:
      the total time of the execution as a human-readable format
      See Also:
      getTotalTime()