Package outputProviders.logInputter
Class LogFileCalculator
java.lang.Object
outputProviders.logInputter.LogFileCalculator
This class contains methods to calculate the statistics of the iteration results of this fuzz attempt, such as exit code
counts, unique values, execution time, ... . It also holds the full name of each variable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringRetrieves the current timestamp in the format "dd-MM-yyyy HH:mm".static StringgetExecutionTime(long elapsedTime) Retrieves the execution time in milliseconds as a formatted string in the format "mm:ss".static intgetExitCodeCount(List<IterationResult> results, int exitCode) Retrieves the count of iteration results with a specific exit code from a list of iteration results.static StringgetFullVariableName(String variableName, boolean appendColon) Get the full variable names of each short name.getUniqueValues(ArrayList<IterationResult> results, String variableName) Gets the unique values for a specific variable name from a list of iteration results.
-
Constructor Details
-
LogFileCalculator
public LogFileCalculator()
-
-
Method Details
-
getExitCodeCount
Retrieves the count of iteration results with a specific exit code from a list of iteration results.- Parameters:
results- The list of iteration results.exitCode- The exit code to count.- Returns:
- The count of iteration results with the specified exit code.
-
getCurrentTimestamp
Retrieves the current timestamp in the format "dd-MM-yyyy HH:mm".- Returns:
- The current timestamp as a formatted string.
-
getExecutionTime
Retrieves the execution time in milliseconds as a formatted string in the format "mm:ss".- Parameters:
elapsedTime- The elapsed time in milliseconds.- Returns:
- The execution time as a formatted string.
-
getUniqueValues
Gets the unique values for a specific variable name from a list of iteration results.- Parameters:
results- List of iteration results where u need the unique value from.variableName- Variable name as specified in the getFullVariableName method input.- Returns:
- List of strings that are the unique values. For error code -> Parsed into String.
-
getFullVariableName
Get the full variable names of each short name.- Parameters:
variableName- Short name of variable.appendColon- True if you want to append a colon and a space to the end of the variable name.- Returns:
- String, full name of the variable in natural language.
-