diff options
author | ulfjack <ulfjack@google.com> | 2018-06-11 07:01:48 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-11 07:02:58 -0700 |
commit | 65173666790d6fff0190c196536d34743b419c12 (patch) | |
tree | b16cba3ef9419c4fb8ce6fd2cc775696cf8727ce /src/main/java/com/google/devtools/build/lib/exec | |
parent | 4cf2ebdcef7b5d4c46e533a560642b89eb3f02a5 (diff) |
Inline some ActionContextProvider classes into their modules
This also gets rid of some boilerplate. The ExecutionTool.addActionContext
method has been around for a while, but is underused.
There are still a few ActionContextProvider implementations left, which are
implementing other functionality besides adding action contexts.
As a side effect, this change reduces null build time with a hot server on
linux by about a quarter. We were running the linux sandbox twice on every
build, which takes about 70ms each (on my machine), with the total null build
time around 300ms.
PiperOrigin-RevId: 200045145
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/exec')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java b/src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java index aa83c16400..d1eabcc1f3 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java +++ b/src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java @@ -18,6 +18,7 @@ import com.google.devtools.common.options.Option; import com.google.devtools.common.options.OptionDocumentationCategory; import com.google.devtools.common.options.OptionEffectTag; import com.google.devtools.common.options.OptionsBase; +import java.time.Duration; import java.util.regex.Pattern; /** @@ -59,4 +60,9 @@ public class LocalExecutionOptions extends OptionsBase { + "locally executed actions which don't use sandboxing" ) public boolean collectLocalExecutionStatistics; + + public Duration getLocalSigkillGraceSeconds() { + // TODO(ulfjack): Change localSigkillGraceSeconds type to Duration. + return Duration.ofSeconds(localSigkillGraceSeconds); + } } |