Skip to content
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

Optimize InstrumentFieldsMiddleware when metrics are disabled #3130

Merged
merged 3 commits into from
May 11, 2022

Conversation

sungam3r
Copy link
Member

No description provided.

@sungam3r sungam3r requested a review from Shane32 May 11, 2022 06:15
@sungam3r sungam3r self-assigned this May 11, 2022
@sungam3r sungam3r added the performance Issue or pull request about performance problems label May 11, 2022
@@ -6,7 +6,14 @@ namespace GraphQL.Instrumentation
public class InstrumentFieldsMiddleware : IFieldMiddleware
{
/// <inheritdoc/>
public async ValueTask<object?> ResolveAsync(IResolveFieldContext context, FieldMiddlewareDelegate next)
public ValueTask<object?> ResolveAsync(IResolveFieldContext context, FieldMiddlewareDelegate next)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sync when metrics are disabled.

Co-authored-by: Shane Krueger <shane@acdmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #3130 (bfb1176) into master (81730d2) will decrease coverage by 0.01%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##           master    #3130      +/-   ##
==========================================
- Coverage   84.38%   84.36%   -0.02%     
==========================================
  Files         362      362              
  Lines       15900    15905       +5     
  Branches     2583     2584       +1     
==========================================
+ Hits        13417    13419       +2     
- Misses       1867     1868       +1     
- Partials      616      618       +2     
Impacted Files Coverage Δ
...phQL/Instrumentation/InstrumentFieldsMiddleware.cs 94.11% <80.00%> (-5.89%) ⬇️
src/GraphQL/Types/Schema.cs 78.99% <0.00%> (-0.92%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81730d2...bfb1176. Read the comment docs.

@sungam3r sungam3r merged commit 8b03256 into master May 11, 2022
@sungam3r sungam3r deleted the instruments branch May 11, 2022 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issue or pull request about performance problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants