server: reduce allocations in setupSpanForIncomingRPC#76174
Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom Feb 10, 2022
Merged
Conversation
Member
1a3702a to
6e0efa0
Compare
abarganier
approved these changes
Feb 9, 2022
Contributor
abarganier
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained
6e0efa0 to
b6442b2
Compare
andreimatei
commented
Feb 9, 2022
Contributor
|
Build failed (retrying...): |
Contributor
Author
|
bors r- merge skew |
Contributor
|
Canceled. |
Release note: None
A couple of variables were independently escaping because they were captured by a closure. This patch groups them into a single allocation, saving two allocations per call. name old time/op new time/op delta SetupSpanForIncomingRPC-32 508ns ± 2% 442ns ± 0% -12.91% (p=0.008 n=5+5) name old alloc/op new alloc/op delta SetupSpanForIncomingRPC-32 178B ± 0% 145B ± 0% -18.54% (p=0.008 n=5+5) name old allocs/op new allocs/op delta SetupSpanForIncomingRPC-32 4.00 ± 0% 2.00 ± 0% -50.00% (p=0.008 n=5+5) Release note: None
b6442b2 to
c6ec6eb
Compare
andreimatei
commented
Feb 9, 2022
Contributor
Author
andreimatei
left a comment
There was a problem hiding this comment.
bors r+
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale)
Contributor
|
This PR was included in a batch that was canceled, it will be automatically retried |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A couple of variables were independently escaping because they were
captured by a closure. This patch groups them into a single allocation,
saving two allocations per call.
name old time/op new time/op delta
SetupSpanForIncomingRPC-32 508ns ± 2% 442ns ± 0% -12.91% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
SetupSpanForIncomingRPC-32 178B ± 0% 145B ± 0% -18.54% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
SetupSpanForIncomingRPC-32 4.00 ± 0% 2.00 ± 0% -50.00% (p=0.008 n=5+5)
Release note: None