-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Generate API validation instead of using reflection #649
Merged
Conversation
This file contains 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
Removes the dependancies on the API generator from awstesting. This ensures that the API generator does not leak into the SDK or the SDK testing.
Updates the SDK to generate its input parameter validation logic instead of using reflection. This improves the performance (cpu/memory) of sending requests by about 20%. Fix aws#537
Closed
@@ -60,5 +60,9 @@ func (a *API) Setup() { | |||
a.removeUnusedShapes() | |||
} | |||
|
|||
if !a.NoValidataShapeMethods { |
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.
This is never set anywhere in the cli/gen-api
folder. Should it be?
Awesome change, and it looks good. |
jasdel
added a commit
that referenced
this pull request
Apr 26, 2016
Closed
skotambkar
pushed a commit
to skotambkar/aws-sdk-go
that referenced
this pull request
May 20, 2021
Regenerates the SDK's protocol tests based on the fixes in smithy-go aws/smithy-go#119. To fix generation of protocol tests with streaming shapes.
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.
Updates the SDK to generate its input parameter validation logic instead
of using reflection. This improves the performance (cpu/memory) of
building requests by about 15-20%.
This change should be transparent to users of the SDK, other than reduction of memory usage, and delay caused by param validation. This change does also refactor the SDK's internal API generator's templates to require go1.6. This will not impact usage of the SDK, just its code generation, which is covered by the private pkg pact.
Fix #537
Suggested to not review the diff as a whole at once since the generated services/protocol commit is pretty large.
This PR greatly improves the performance of validating API operation params. At the micro level the impact of validation now is extremely little. In the context of marshaling and signing a request this improves validation by about 15%-20%.
go test -bench . -benchmem -run NONE ./aws/corehandlers/
Benchmark results with a simpler operation, and additional isolated bench of validation by its self.
go test -bench . -run NONE -benchmem bench_test.go