use of com.google.devtools.build.lib.buildtool.buildevent.ExecutionPhaseCompleteEvent in project bazel by bazelbuild.
the class ExecutionTool method determineSuccessfulTargets.
/**
* Computes the result of the build. Sets the list of successful (up-to-date)
* targets in the request object.
*
* @param configuredTargets The configured targets whose artifacts are to be
* built.
* @param timer A timer that was started when the execution phase started.
*/
private Collection<ConfiguredTarget> determineSuccessfulTargets(Collection<ConfiguredTarget> configuredTargets, Set<ConfiguredTarget> builtTargets, Stopwatch timer) {
// Maintain the ordering by copying builtTargets into a LinkedHashSet in the same iteration
// order as configuredTargets.
Collection<ConfiguredTarget> successfulTargets = new LinkedHashSet<>();
for (ConfiguredTarget target : configuredTargets) {
if (builtTargets.contains(target)) {
successfulTargets.add(target);
}
}
env.getEventBus().post(new ExecutionPhaseCompleteEvent(timer.stop().elapsed(MILLISECONDS)));
return successfulTargets;
}
Aggregations