diff options
author | Klaus Aehlig <aehlig@google.com> | 2017-11-15 06:27:59 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-11-15 06:30:03 -0800 |
commit | 84943fc8f84fef04cf0a7b7fe7f0abea1e1497f2 (patch) | |
tree | 2d8798aa78138c98c27cb0bfbde2130534bb2f36 /src/main/java/com/google/devtools/build/lib/runtime | |
parent | 2686e4e301dec8d30b901e8fcdce70dd83cec69c (diff) |
UI: show status instead of strategy for non-executing actions
Even if an action is planned to run and a strategy assigned,
it does not mean it is actually executing; e.g., it might be
waiting for local resources. To reduce confusion, show the
status instead of the execution strategy for non-executing
actions. Also avoid the word "running" for the total number
of executing and scheduled to be executed actions.
Improves on Issue #4089.
Change-Id: If658c1a24ee26eb27ccd892847af18015355a8d3
PiperOrigin-RevId: 175818071
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java index d03805dbaa..5df6a8dcdb 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java @@ -245,11 +245,16 @@ class ExperimentalStateTracker { void actionStatusMessage(ActionStatusMessage event) { String strategy = event.getStrategy(); + String name = event.getActionMetadata().getPrimaryOutput().getPath().getPathString(); if (strategy != null) { - String name = event.getActionMetadata().getPrimaryOutput().getPath().getPathString(); synchronized (this) { actionStrategy.put(name, strategy); } + } else { + String message = event.getMessage(); + synchronized (this) { + actionStrategy.put(name, message); + } } } @@ -736,14 +741,14 @@ class ExperimentalStateTracker { terminalWriter.append(";"); } if (runningActions.size() == 0) { - terminalWriter.normal().append(" no action running"); + terminalWriter.normal().append(" no action"); maybeShowRecentTest(terminalWriter, shortVersion, targetWidth - terminalWriter.getPosition()); } else if (runningActions.size() == 1) { if (maybeShowRecentTest(null, shortVersion, targetWidth - terminalWriter.getPosition())) { // As we will break lines anyway, also show the number of running actions, to keep // things stay roughly in the same place (also compensating for the missing plural-s // in the word action). - terminalWriter.normal().append(" 1 action running"); + terminalWriter.normal().append(" 1 action"); maybeShowRecentTest( terminalWriter, shortVersion, targetWidth - terminalWriter.getPosition()); String statusMessage = @@ -766,10 +771,10 @@ class ExperimentalStateTracker { clock.nanoTime(), targetWidth - terminalWriter.getPosition(), null); - statusMessage += " ... (" + runningActions.size() + " actions running)"; + statusMessage += " ... (" + runningActions.size() + " actions)"; terminalWriter.normal().append(" " + statusMessage); } else { - String statusMessage = "" + runningActions.size() + " actions running"; + String statusMessage = "" + runningActions.size() + " actions"; terminalWriter.normal().append(" " + statusMessage); maybeShowRecentTest( terminalWriter, shortVersion, targetWidth - terminalWriter.getPosition()); |