Skip to content

Commit dd932bf

Browse files
committed
more performance, disable tests
1 parent 457a6b8 commit dd932bf

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

src/jmh/java/performance/DataLoaderPerformance.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
@State(Scope.Benchmark)
3737
@Warmup(iterations = 2, time = 5)
3838
@Measurement(iterations = 5)
39-
@Fork(3)
39+
@Fork(2)
4040
public class DataLoaderPerformance {
4141

4242
static Owner o1 = new Owner("O-1", "Andi", List.of("P-1", "P-2", "P-3"));

src/main/java/graphql/schema/DataLoaderWithContext.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import org.jspecify.annotations.NullMarked;
1111
import org.jspecify.annotations.Nullable;
1212

13-
import java.util.List;
1413
import java.util.concurrent.CompletableFuture;
1514

1615
@Internal
@@ -43,16 +42,4 @@ public CompletableFuture<V> load(@NonNull K key, @Nullable Object keyContext) {
4342
}
4443
return result;
4544
}
46-
47-
@Override
48-
public CompletableFuture<List<V>> dispatch() {
49-
CompletableFuture<List<V>> dispatchResult = delegate.dispatch();
50-
dispatchResult.whenComplete((result, error) -> {
51-
if (result != null && result.size() > 0) {
52-
DataFetchingEnvironmentImpl.DFEInternalState dfeInternalState = (DataFetchingEnvironmentImpl.DFEInternalState) dfe.toInternal();
53-
dfeInternalState.getProfiler().manualDispatch(dataLoaderName, dfe.getExecutionStepInfo().getPath().getLevel(), result.size());
54-
}
55-
});
56-
return dispatchResult;
57-
}
5845
}

src/test/groovy/graphql/ProfilerTest.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import org.dataloader.BatchLoader
1414
import org.dataloader.DataLoader
1515
import org.dataloader.DataLoaderFactory
1616
import org.dataloader.DataLoaderRegistry
17+
import spock.lang.Ignore
1718
import spock.lang.Specification
1819

1920
import java.time.Duration
@@ -176,6 +177,7 @@ class ProfilerTest extends Specification {
176177
}
177178

178179

180+
@Ignore("not available for performance reasons at the moment")
179181
def "manual dataloader dispatch"() {
180182
given:
181183
def sdl = '''
@@ -230,6 +232,7 @@ class ProfilerTest extends Specification {
230232

231233
}
232234

235+
@Ignore("not available for performance reasons at the moment")
233236
def "cached dataloader values"() {
234237
given:
235238
def sdl = '''
@@ -517,6 +520,7 @@ class ProfilerTest extends Specification {
517520

518521
}
519522

523+
@Ignore("not available for performance reasons at the moment")
520524
def "dataloader usage"() {
521525
given:
522526
def sdl = '''

0 commit comments

Comments
 (0)