aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Eric Fellheimer <felly@google.com>2015-04-15 20:21:52 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-04-16 18:35:50 +0000
commite49b3bac82a2709d897520997135b816721e0ef8 (patch)
tree40c17c25e0d0da82ac34dbc4efb5c8c37653a072 /src/main/java/com
parent9d8e8ac27e3011f1ec7ac177028698aa2b8d4501 (diff)
Tweak the default Skyframe thread count during testing. Since test cases are typically small, the current default is too high.
-- MOS_MIGRATED_REVID=91225981
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
index c02e92d897..e3e954f434 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
@@ -151,7 +151,11 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
// I just bumped this to 200 to get reasonable execution phase performance; that may cause
// significant overhead for CPU-bound processes (i.e. analysis). [skyframe-analysis]
@VisibleForTesting
- public static final int DEFAULT_THREAD_COUNT = 200;
+ public static final int DEFAULT_THREAD_COUNT =
+ // Reduce thread count while running tests of Bazel. Test cases are typically small, and large
+ // thread pools vying for a relatively small number of CPU cores may induce non-optimal
+ // performance.
+ System.getenv("TEST_TMPDIR") == null ? 200 : 5;
// Stores Packages between reruns of the PackageFunction (because of missing dependencies,
// within the same evaluate() run) to avoid loading the same package twice (first time loading