Class StatisticsAnalysis
java.lang.Object
org.variantsync.diffdetective.analysis.StatisticsAnalysis
- All Implemented Interfaces:
Analysis.Hooks
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
private final Clock
private final List<CommitProcessTime>
private int
static final AnalysisResult.ResultKey<StatisticsAnalysis.Result>
private final Clock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
analyzeVariationDiff
(Analysis analysis) The main hook for analyzing non-empty diff trees.void
beginBatch
(Analysis analysis) boolean
beginCommit
(Analysis analysis) void
void
static void
exportCommitTimes
(List<CommitProcessTime> commitTimes, Path pathToOutputFile) Exports the given commit times to the given file.void
initializeResults
(Analysis analysis) Initialization hook forAnalysis.getResult()
.void
onFailedCommit
(Analysis analysis) Signals a parsing failure of all patches in the current commit.boolean
onParsedCommit
(Analysis analysis) Signals the completion of the commit diff extraction.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.variantsync.diffdetective.analysis.Analysis.Hooks
beginPatch, endPatch, onFailedParse
-
Field Details
-
COMMIT_TIME_FILE_EXTENSION
- See Also:
-
RESULT
-
commitTimes
-
totalTime
-
commitProcessTimer
-
numVariationDiffs
private int numVariationDiffs
-
-
Constructor Details
-
StatisticsAnalysis
public StatisticsAnalysis()
-
-
Method Details
-
initializeResults
Description copied from interface:Analysis.Hooks
Initialization hook forAnalysis.getResult()
. All result types should be appended with a neutral value usingAnalysis.append(org.variantsync.diffdetective.analysis.AnalysisResult.ResultKey<T>, T)
. No other side effects should be performed during this methods as it might be called an arbitrary amount of times.- Specified by:
initializeResults
in interfaceAnalysis.Hooks
-
beginBatch
- Specified by:
beginBatch
in interfaceAnalysis.Hooks
-
beginCommit
- Specified by:
beginCommit
in interfaceAnalysis.Hooks
-
onParsedCommit
Description copied from interface:Analysis.Hooks
Signals the completion of the commit diff extraction. Called exactly once during the commit phase before the patch phase begins.- Specified by:
onParsedCommit
in interfaceAnalysis.Hooks
-
onFailedCommit
Description copied from interface:Analysis.Hooks
Signals a parsing failure of all patches in the current commit. Called at most once during the commit phase. If this hook is calledAnalysis.Hooks.onParsedCommit(org.variantsync.diffdetective.analysis.Analysis)
and the following patch phase invocations are skipped.- Specified by:
onFailedCommit
in interfaceAnalysis.Hooks
-
analyzeVariationDiff
Description copied from interface:Analysis.Hooks
The main hook for analyzing non-empty diff trees. Called at most once during the patch phase.- Specified by:
analyzeVariationDiff
in interfaceAnalysis.Hooks
-
endCommit
- Specified by:
endCommit
in interfaceAnalysis.Hooks
-
endBatch
- Specified by:
endBatch
in interfaceAnalysis.Hooks
- Throws:
IOException
-
exportCommitTimes
public static void exportCommitTimes(List<CommitProcessTime> commitTimes, Path pathToOutputFile) throws IOException Exports the given commit times to the given file. Overwrites existing files.- Parameters:
commitTimes
- List of all CommitProcessTimes to write into a single file.pathToOutputFile
- Output file to write.- Throws:
IOException
-