use of com.facebook.buck.rules.BuildRuleDurationTracker in project buck by facebook.
the class SuperConsoleEventBusListenerTest method setUp.
@Before
public void setUp() {
vfs = Jimfs.newFileSystem(Configuration.unix());
logPath = vfs.getPath("log.txt");
durationTracker = new BuildRuleDurationTracker();
}
use of com.facebook.buck.rules.BuildRuleDurationTracker in project buck by facebook.
the class RuleKeyLoggerListenerTest method setUp.
@Before
public void setUp() throws IOException {
tempDirectory = new TemporaryFolder();
tempDirectory.create();
projectFilesystem = new ProjectFilesystem(tempDirectory.getRoot().toPath());
outputExecutor = MostExecutors.newSingleThreadExecutor(new CommandThreadFactory(getClass().getName()));
info = InvocationInfo.of(new BuildId(), false, false, "topspin", tempDirectory.getRoot().toPath());
durationTracker = new BuildRuleDurationTracker();
}
use of com.facebook.buck.rules.BuildRuleDurationTracker in project buck by facebook.
the class SimpleConsoleEventBusListenerTest method setUp.
@Before
public void setUp() {
vfs = Jimfs.newFileSystem(Configuration.unix());
logPath = vfs.getPath("log.txt");
durationTracker = new BuildRuleDurationTracker();
}
use of com.facebook.buck.rules.BuildRuleDurationTracker in project buck by facebook.
the class BuildThreadStateRendererTest method createRuleBeginningEventOptional.
private static Optional<? extends BuildRuleEvent.BeginningBuildRuleEvent> createRuleBeginningEventOptional(long threadId, long timeMs, long durationMs, BuildRule rule) {
BuildRuleDurationTracker durationTracker = new BuildRuleDurationTracker();
durationTracker.setDuration(rule, new ClockDuration(durationMs, 0, 0));
RuleKey ruleKey = new RuleKey(HashCode.fromString("aa"));
return Optional.of(TestEventConfigurator.configureTestEventAtTime(BuildRuleEvent.resumed(rule, durationTracker, new FakeRuleKeyFactory(ImmutableMap.of(rule.getBuildTarget(), ruleKey))), timeMs, TimeUnit.MILLISECONDS, threadId));
}
use of com.facebook.buck.rules.BuildRuleDurationTracker in project buck by facebook.
the class CacheRateStatsKeeperTest method finishedEvent.
BuildRuleEvent.Finished finishedEvent(CacheResult cacheResult) {
BuildRule rule = FakeBuildRule.newEmptyInstance("//fake:rule");
BuildRuleDurationTracker durationTracker = new BuildRuleDurationTracker();
BuildRuleEvent.Started started = TestEventConfigurator.configureTestEvent(BuildRuleEvent.started(rule, durationTracker));
return BuildRuleEvent.finished(started, BuildRuleKeys.of(new RuleKey("aa")), BuildRuleStatus.SUCCESS, cacheResult, Optional.empty(), Optional.empty(), Optional.empty());
}
Aggregations