diff options
author | Klaus Aehlig <aehlig@google.com> | 2016-02-25 07:59:59 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2016-02-25 14:14:42 +0000 |
commit | a8245ab13e97cf8ca47efb6863479016703c7f66 (patch) | |
tree | 66d12e0953ecc389d273b9b604db1d7d835c3874 | |
parent | 86c319e313529b52da0f0fc6062c27a7e75afe5b (diff) |
Report the completion of the loading Phase
Once loading is completed, report this fact. Also report the
number of targets for later reference.
--
Change-Id: Ibffbaa7add9fed48107d8fb320bd2349b1fac503
Reviewed-on: https://bazel-review.googlesource.com/#/c/3012
MOS_MIGRATED_REVID=115533328
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java index bb60f52857..242467f939 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java @@ -13,7 +13,9 @@ // limitations under the License. package com.google.devtools.build.lib.runtime; +import com.google.common.eventbus.Subscribe; import com.google.devtools.build.lib.events.Event; +import com.google.devtools.build.lib.pkgcache.LoadingPhaseCompleteEvent; import com.google.devtools.build.lib.util.io.AnsiTerminal; import com.google.devtools.build.lib.util.io.OutErr; @@ -54,6 +56,18 @@ public class ExperimentalEventHandler extends BlazeCommandEventHandler { // The actual new UI. } + @Subscribe + public void loadingComplete(LoadingPhaseCompleteEvent event) { + try { + terminal.textGreen(); + terminal.writeString("INFO:"); + terminal.resetTerminal(); + terminal.writeString(" " + event.getTargets().size() + " Target(s)\n"); + } catch (IOException e) { + LOG.warning("IO Error writing to output stream: " + e); + } + } + public void resetTerminal() { try { terminal.resetTerminal(); |