Package hlcd.linearCode
Class CodeStatistics
java.lang.Object
hlcd.linearCode.CodeStatistics
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionCodeStatistics(CodeParameters cp, CodeValidatorParameters cvp, long recursiveCallsCount, long startTime, long endTime)Constructs the code statistics based on the parameters specified. -
Method Summary
Modifier and TypeMethodDescriptionReturns the code parameters associated with the code.Returns the code validator parameters associated with the code.longReturns the end time of the execution.Returns the total time of the execution as a human-readable format.longReturns the number of recursive calls carried out during execution.longReturns the start time of the execution.longReturns the total time of the execution as along.
-
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 coderecursiveCallsCount- the number of recursive calls neededstartTime- the start time of the execution of the codeendTime- the end time of the execution of the code
-
-
Method Details
-
getCodeParameters
Returns the code parameters associated with the code.- Returns:
- the code parameters associated with the code
-
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 along. It is better to usegetLapsedTime()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
Returns the total time of the execution as a human-readable format. This method will probably be used a lot more often thangetTotalTime(), which returns the lapsed time as along.- Returns:
- the total time of the execution as a human-readable format
- See Also:
getTotalTime()
-