diff options
author | 2017-08-23 21:09:11 +0200 | |
---|---|---|
committer | 2017-08-24 13:58:56 +0200 | |
commit | be6a40181efb6bcb4167328cada3d541c009c3aa (patch) | |
tree | 53bd3ace765257bdb17a79ff967e7c5af061b487 /src/main/java/com/google | |
parent | eb3261dd0c2d52b79b5b323a0fe12cf46e8062d8 (diff) |
Annotate CriticalPathComputer's Subscriber methods with @AllowConcurrentEvents so as to allow concurrently published events to be handled concurrently. The lack of this annotation means sequential @Subscriber work is a bottleneck during the execution phase.
RELNOTES: None
PiperOrigin-RevId: 166235310
Diffstat (limited to 'src/main/java/com/google')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/CriticalPathComputer.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CriticalPathComputer.java b/src/main/java/com/google/devtools/build/lib/runtime/CriticalPathComputer.java index 0702fd198f..b55ddb5ea2 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/CriticalPathComputer.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/CriticalPathComputer.java @@ -16,6 +16,7 @@ package com.google.devtools.build.lib.runtime; import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; +import com.google.common.eventbus.AllowConcurrentEvents; import com.google.common.eventbus.Subscribe; import com.google.devtools.build.lib.actions.Action; import com.google.devtools.build.lib.actions.ActionCompletionEvent; @@ -98,6 +99,7 @@ public abstract class CriticalPathComputer<C extends AbstractCriticalPathCompone * @param event information about the started action */ @Subscribe + @AllowConcurrentEvents public void actionStarted(ActionStartedEvent event) { Action action = event.getAction(); tryAddComponent(createComponent(action, event.getNanoTimeStart())); @@ -111,6 +113,7 @@ public abstract class CriticalPathComputer<C extends AbstractCriticalPathCompone * for the same middleman. This should only happen if the actions are shared. */ @Subscribe + @AllowConcurrentEvents public void middlemanAction(ActionMiddlemanEvent event) { Action action = event.getAction(); C component = tryAddComponent(createComponent(action, event.getNanoTimeStart())); @@ -187,6 +190,7 @@ public abstract class CriticalPathComputer<C extends AbstractCriticalPathCompone * middle of the critical path. */ @Subscribe + @AllowConcurrentEvents public void actionCached(CachedActionEvent event) { Action action = event.getAction(); C component = tryAddComponent(createComponent(action, event.getNanoTimeStart())); @@ -198,6 +202,7 @@ public abstract class CriticalPathComputer<C extends AbstractCriticalPathCompone * dependent artifacts and records the critical path stats. */ @Subscribe + @AllowConcurrentEvents public void actionComplete(ActionCompletionEvent event) { Action action = event.getAction(); C component = Preconditions.checkNotNull( |