aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/TestCompletionValue.java
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2016-03-03 08:08:50 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-03-03 15:27:55 +0000
commitf745e99db7632cfb2145b6926f961e85f9084bc5 (patch)
treefbf6faf5c3bd701d551b0f27a2a04ab475a07ee9 /src/main/java/com/google/devtools/build/lib/skyframe/TestCompletionValue.java
parent9b88920b70a1c0fafc5865b370d90a80ad7cae70 (diff)
Use static creation method for SkyKey. This allows interning SkyKeys as they are created, as opposed to when they are requested from the ParallelEvaluator. That delay can lead to large memory spikes and churn.
-- MOS_MIGRATED_REVID=116224565
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/TestCompletionValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/TestCompletionValue.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/TestCompletionValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/TestCompletionValue.java
index eb2cfd4976..4cb899826a 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/TestCompletionValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/TestCompletionValue.java
@@ -32,18 +32,21 @@ public class TestCompletionValue implements SkyValue {
private TestCompletionValue() { }
public static SkyKey key(LabelAndConfiguration lac, boolean exclusive) {
- return new SkyKey(SkyFunctions.TEST_COMPLETION, new TestCompletionKey(lac, exclusive));
+ return SkyKey.create(SkyFunctions.TEST_COMPLETION, new TestCompletionKey(lac, exclusive));
}
public static Iterable<SkyKey> keys(Collection<ConfiguredTarget> targets,
final boolean exclusive) {
- return Iterables.transform(targets, new Function<ConfiguredTarget, SkyKey>() {
- @Override
- public SkyKey apply(ConfiguredTarget ct) {
- return new SkyKey(SkyFunctions.TEST_COMPLETION,
- new TestCompletionKey(new LabelAndConfiguration(ct), exclusive));
- }
- });
+ return Iterables.transform(
+ targets,
+ new Function<ConfiguredTarget, SkyKey>() {
+ @Override
+ public SkyKey apply(ConfiguredTarget ct) {
+ return SkyKey.create(
+ SkyFunctions.TEST_COMPLETION,
+ new TestCompletionKey(new LabelAndConfiguration(ct), exclusive));
+ }
+ });
}
static class TestCompletionKey {