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

chore: Add serde performance tests to protocol test suite #1862

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jbelkins
Copy link
Contributor

@jbelkins jbelkins commented Jan 9, 2025

Description of changes

Adds a performance testing target to protocol tests:

  • A shape is code-generated along with its serde methods.
  • Three arrays of test objects are prepared, each an order of magnitude larger than the one before.
  • The test data is converted to JSON data.
  • The JSON data is deserialized back into an array of test objects, using the following:
    • SmithyJSON Reader
    • Swift Decodable / JSONDecoder
  • Time measurements are taken with Xcode on the deserialization process.
  • The deserialized test objects are compared to the originals, to verify that deserialization was accurate.

These tests may be extended with new Smithy protocols and other serde methods in the future.

New/existing dependencies impact assessment, if applicable

No new dependencies were added to this change.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jbelkins jbelkins changed the title Jbe/serde performance tests chore: Add serde performance tests to protocol test suite Jan 9, 2025
@jbelkins
Copy link
Contributor Author

jbelkins commented Jan 9, 2025

CI is failing due to the JSON double decoding issue:
smithy-lang/smithy-swift#896

Tests should pass once that merges.

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.

1 participant