◐ Shell
reader mode source ↗
Skip to content

adding Profiler#3976

Merged
dondonz merged 30 commits into
masterfrom
profiler-2
Jul 21, 2025
Merged

adding Profiler#3976
dondonz merged 30 commits into
masterfrom
profiler-2

Conversation

@andimarek

@andimarek andimarek commented May 19, 2025

Copy link
Copy Markdown
Member

While we recently added a Java agent to profile a GraphQL Java application the following things became clear:

Java agents are not the future of the JVM: soon a dynamic loading will be forbidden. See https://openjdk.org/jeps/451
We added the ability to track the engine running state
We added the ability to chain DataLoaders, which as a side effect allow for tracking which dataloaders are used by which field / DataFetcher
Together this means Java agents are not really future proof + they are not needed anymore, as we have all the abilities now inside GraphQL Java directly itself.

The goal is to remove the Java agent eventually and offer a better alternative in form of this PR: a built-in Profiler in GraphQL Java.

A Profiler is enabled per execution (request) and will collect with very minimal overhead all relevant informations to understand the performance and execution. The result will be made available via GraphQLContext.

@github-actions

github-actions Bot commented May 19, 2025

Copy link
Copy Markdown
Contributor

Test Results

  324 files    324 suites   4m 16s ⏱️
5 004 tests 4 989 ✅ 15 💤 0 ❌
5 093 runs  5 078 ✅ 15 💤 0 ❌

Results for commit 572090e.

♻️ This comment has been updated with latest results.

andimarek added 8 commits July 1, 2025 06:52
# Conflicts:
#	src/main/java/graphql/execution/instrumentation/dataloader/PerLevelDataLoaderDispatchStrategy.java
#	src/main/java/graphql/schema/DataFetchingEnvironmentImpl.java
# Conflicts:
#	src/main/java/graphql/EngineRunningState.java
#	src/main/java/graphql/ExecutionInput.java
#	src/main/java/graphql/GraphQL.java
#	src/main/java/graphql/execution/ExecutionContext.java
#	src/test/groovy/graphql/execution/AsyncExecutionStrategyTest.groovy
#	src/test/groovy/graphql/execution/AsyncSerialExecutionStrategyTest.groovy
#	src/test/groovy/graphql/execution/ExecutionStrategyTest.groovy
#	src/test/groovy/graphql/execution/instrumentation/fieldvalidation/FieldValidationTest.groovy
Hide details View details @dondonz dondonz merged commit ff857a6 into master Jul 21, 2025
2 checks passed
@dondonz dondonz deleted the profiler-2 branch July 21, 2025 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants