Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more performance, disable tests
  • Loading branch information
andimarek committed Oct 12, 2025
commit dd932bf250dde15a23e56449d30c71e7cb89871c
2 changes: 1 addition & 1 deletion src/jmh/java/performance/DataLoaderPerformance.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@State(Scope.Benchmark)
@Warmup(iterations = 2, time = 5)
@Measurement(iterations = 5)
@Fork(3)
@Fork(2)
public class DataLoaderPerformance {

static Owner o1 = new Owner("O-1", "Andi", List.of("P-1", "P-2", "P-3"));
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/graphql/schema/DataLoaderWithContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

import java.util.List;
import java.util.concurrent.CompletableFuture;

@Internal
Expand Down Expand Up @@ -43,16 +42,4 @@ public CompletableFuture<V> load(@NonNull K key, @Nullable Object keyContext) {
}
return result;
}

@Override
public CompletableFuture<List<V>> dispatch() {
CompletableFuture<List<V>> dispatchResult = delegate.dispatch();
dispatchResult.whenComplete((result, error) -> {
if (result != null && result.size() > 0) {
DataFetchingEnvironmentImpl.DFEInternalState dfeInternalState = (DataFetchingEnvironmentImpl.DFEInternalState) dfe.toInternal();
dfeInternalState.getProfiler().manualDispatch(dataLoaderName, dfe.getExecutionStepInfo().getPath().getLevel(), result.size());
}
});
return dispatchResult;
}
}
4 changes: 4 additions & 0 deletions src/test/groovy/graphql/ProfilerTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import org.dataloader.BatchLoader
import org.dataloader.DataLoader
import org.dataloader.DataLoaderFactory
import org.dataloader.DataLoaderRegistry
import spock.lang.Ignore
import spock.lang.Specification

import java.time.Duration
Expand Down Expand Up @@ -176,6 +177,7 @@ class ProfilerTest extends Specification {
}


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

}

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

}

@Ignore("not available for performance reasons at the moment")
def "dataloader usage"() {
given:
def sdl = '''
Expand Down