diff options
author | tomlu <tomlu@google.com> | 2018-06-19 15:07:26 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-19 15:09:17 -0700 |
commit | a0e8aae4b30a23d6a3069c343a47cd56b5ed3809 (patch) | |
tree | 255a02dc61f029f3495ca7bbee4f54bc1a6fa40c /src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java | |
parent | af545684f4f9c2697951d291d00ae2106ff65041 (diff) |
Add new BuildMetrics event to BEP.
To start we add just a single metric, the number of actions constructed in the current build.
RELNOTES: None
PiperOrigin-RevId: 201248490
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java b/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java index 9d7bf274f9..20bf5d5879 100644 --- a/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java +++ b/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java @@ -153,16 +153,19 @@ public abstract class AbstractExceptionalParallelEvaluator<E extends Exception> // retrieve them, but top-level nodes are presumably of more interest. // If valueVersion is not equal to graphVersion, it must be less than it (by the // Preconditions check above), and so the node is clean. + EvaluationState evaluationState = + valueVersion.equals(evaluatorContext.getGraphVersion()) + ? EvaluationState.BUILT + : EvaluationState.CLEAN; evaluatorContext .getProgressReceiver() .evaluated( key, + evaluationState == EvaluationState.BUILT ? value : null, value != null ? EvaluationSuccessState.SUCCESS.supplier() : EvaluationSuccessState.FAILURE.supplier(), - valueVersion.equals(evaluatorContext.getGraphVersion()) - ? EvaluationState.BUILT - : EvaluationState.CLEAN); + evaluationState); } } |