public class VersionControlStatsGenerator extends Object
Modifier and Type | Class and Description |
---|---|
static class |
VersionControlStatsGenerator.Mode
Modes the generator can get stats in, in order from least comprehensive to most comprehensive.
|
Constructor and Description |
---|
VersionControlStatsGenerator(VersionControlCmdLineInterface versionControlCmdLineInterface,
Optional<com.facebook.buck.util.versioncontrol.FastVersionControlStats> pregeneratedVersionControlStats) |
Modifier and Type | Method and Description |
---|---|
Optional<FullVersionControlStats> |
generateStats(VersionControlStatsGenerator.Mode mode) |
com.google.common.util.concurrent.ListenableFuture<Optional<FullVersionControlStats>> |
generateStatsAsync(boolean shouldUploadBuildReport,
boolean shouldPreGenerate,
BuckEventBus buckEventBus,
com.google.common.util.concurrent.ListeningExecutorService executorService)
Generate
FullVersionControlStats . |
public VersionControlStatsGenerator(VersionControlCmdLineInterface versionControlCmdLineInterface, Optional<com.facebook.buck.util.versioncontrol.FastVersionControlStats> pregeneratedVersionControlStats)
public com.google.common.util.concurrent.ListenableFuture<Optional<FullVersionControlStats>> generateStatsAsync(boolean shouldUploadBuildReport, boolean shouldPreGenerate, BuckEventBus buckEventBus, com.google.common.util.concurrent.ListeningExecutorService executorService)
FullVersionControlStats
. The parameters define which mode is generatedshouldUploadBuildReport
- if this buck build will upload a full build report then we
generate FullVersionControlStats
, otherwise just generate SlowVersionControlStats
.shouldPreGenerate
- if true, return a FastVersionControlStats
regardless of shouldUploadBuildReport
's valuebuckEventBus
- the eventBus to which post the VersionControlStatsEvent
executorService
- to which this future is attached to. Preferably a diskIO executor
Service.public Optional<FullVersionControlStats> generateStats(VersionControlStatsGenerator.Mode mode) throws InterruptedException
InterruptedException