-
Notifications
You must be signed in to change notification settings - Fork 1.2k
adding Profiler #3976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding Profiler #3976
Changes from all commits
0651b82
cc1de5e
eef80ec
15cf642
b7379ef
275eaac
cd002c0
b75a14d
450a9fc
5e9e713
b3515b7
1800f77
221b416
2ba4123
4008c11
f7e31e6
3e29da4
999bb2f
5dde0e3
4a47b9d
0b7c15b
e6faa18
0ab88da
8bcdef8
62f1e84
76cdbc1
ca618b4
535eb8e
a04f5cb
572090e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| package graphql; | ||
|
|
||
| import graphql.execution.EngineRunningObserver; | ||
| import graphql.execution.ResultPath; | ||
| import graphql.execution.instrumentation.Instrumentation; | ||
| import graphql.language.OperationDefinition; | ||
| import graphql.schema.DataFetcher; | ||
| import graphql.schema.GraphQLFieldDefinition; | ||
| import graphql.schema.GraphQLOutputType; | ||
| import org.jspecify.annotations.NullMarked; | ||
| import org.jspecify.annotations.Nullable; | ||
|
|
||
| @Internal | ||
| @NullMarked | ||
| public interface Profiler { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a quick JavaDoc explaining what this does
Of course 1 sentence isn't enough, let's add a documentation link here when it's written
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an internal class btw |
||
|
|
||
|
|
||
| Profiler NO_OP = new Profiler() { | ||
| }; | ||
|
|
||
|
|
||
| default void setExecutionInputAndInstrumentation(ExecutionInput executionInput, Instrumentation instrumentation) { | ||
|
|
||
| } | ||
|
|
||
| default void dataLoaderUsed(String dataLoaderName) { | ||
|
|
||
|
|
||
| } | ||
|
|
||
| default void fieldFetched(Object fetchedObject, DataFetcher<?> originalDataFetcher, DataFetcher<?> dataFetcher, ResultPath path, GraphQLFieldDefinition fieldDef, GraphQLOutputType parentType) { | ||
|
|
||
| } | ||
|
|
||
| default @Nullable EngineRunningObserver wrapEngineRunningObserver(@Nullable EngineRunningObserver engineRunningObserver) { | ||
| return engineRunningObserver; | ||
| } | ||
|
|
||
| default void operationDefinition(OperationDefinition operationDefinition) { | ||
|
|
||
| } | ||
|
|
||
| default void oldStrategyDispatchingAll(int level) { | ||
|
|
||
| } | ||
|
|
||
| default void batchLoadedOldStrategy(String name, int level, int count) { | ||
|
|
||
|
|
||
| } | ||
|
|
||
| default void batchLoadedNewStrategy(String dataLoaderName, @Nullable Integer level, int count) { | ||
|
|
||
| } | ||
|
|
||
| default <V> void manualDispatch(String dataLoaderName, int level, int count) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice |
||
|
|
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For another PR, not this one
Can you add the toggle to
GraphQLUnusualConfigurationinstead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be discussed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be considered in another PR