public class ProgressEstimator extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
static String |
EXPECTED_NUMBER_OF_GENERATED_PROJECT_FILES |
static String |
EXPECTED_NUMBER_OF_PARSED_BUCK_FILES |
static String |
EXPECTED_NUMBER_OF_PARSED_RULES |
static String |
PROGRESS_ESTIMATIONS_JSON |
Constructor and Description |
---|
ProgressEstimator(Optional<Path> storageFile,
BuckEventBus buckEventBus) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
didFinishBuild() |
Future<?> |
didFinishParsing()
Indicates that buck has finished parsing, updating the progress estimation accordingly
|
Future<?> |
didFinishProjectGeneration()
Indicates that project generation is finished
|
void |
didFinishRule() |
Future<?> |
didGenerateProjectForTarget()
Indicates that a project file has been generated
|
Future<?> |
didParseBuckRules(int amount)
Updates the amount of rules done parsing
|
void |
didStartBuild() |
Optional<Double> |
getApproximateBuildProgress() |
ProgressEstimation |
getEstimatedProgressOfCreatingActionGraph() |
Optional<Double> |
getEstimatedProgressOfGeneratingProjectFiles() |
ProgressEstimation |
getEstimatedProgressOfParsingBuckFiles() |
Future<?> |
setCurrentCommand(String commandName,
com.google.common.collect.ImmutableList<String> commandArgs)
Sets the current command that we are estimating
|
void |
setNumberOfRules(int count) |
public static final String EXPECTED_NUMBER_OF_PARSED_RULES
public static final String EXPECTED_NUMBER_OF_PARSED_BUCK_FILES
public static final String EXPECTED_NUMBER_OF_GENERATED_PROJECT_FILES
public static final String PROGRESS_ESTIMATIONS_JSON
public ProgressEstimator(Optional<Path> storageFile, BuckEventBus buckEventBus)
public Future<?> setCurrentCommand(String commandName, com.google.common.collect.ImmutableList<String> commandArgs)
commandName
- the name of the commandcommandArgs
- the arguments to the commandpublic Future<?> didParseBuckRules(int amount)
amount
- the number of rules done parsingpublic Future<?> didFinishParsing()
public Future<?> didGenerateProjectForTarget()
public Future<?> didFinishProjectGeneration()
public void setNumberOfRules(int count)
public void didFinishRule()
public void didStartBuild()
public void didFinishBuild()
public ProgressEstimation getEstimatedProgressOfParsingBuckFiles()
public ProgressEstimation getEstimatedProgressOfCreatingActionGraph()
public Optional<Double> getEstimatedProgressOfGeneratingProjectFiles()
public Optional<Double> getApproximateBuildProgress()
public void close()
close
in interface AutoCloseable