Skip to content

test: extend DynamoDB performance benchmarks - #7300

Open
iulianbudau wants to merge 1 commit into
aws:masterfrom
iulianbudau:feature/extend-dynamodb-benchmarks
Open

test: extend DynamoDB performance benchmarks#7300
iulianbudau wants to merge 1 commit into
aws:masterfrom
iulianbudau:feature/extend-dynamodb-benchmarks

Conversation

@iulianbudau

Copy link
Copy Markdown
Contributor

Motivation and Context

AWS SDK for Java v2 already has useful DynamoDB protocol/marshalling and Enhanced Client mapper benchmarks, but coverage is fragmented across different measurement boundaries. Those existing benches remain valuable; this change complements them rather than replacing them.
This PR adds a coherent DynamoDB-specific suite under test/sdk-benchmarks so maintainers can evaluate:

  • deterministic full SDK client-side performance (mocked HTTP)
  • overhead across LOW, DOCUMENT, and TYPED API abstractions
  • sync vs async single-operation completion
  • end-to-end behavior against real DynamoDB (explicit opt-in only)
    All newly added benchmarks are manual-execution only. This PR does not modify BenchmarkRunner, MAPPER_BENCHMARKS skip behavior, shards, baseline.json, regression gates, CI workflows, or scheduled live execution.

Modifications

Tier C — Mocked full SDK pipeline

Deterministic client-side path (Enhanced mapping where applicable → endpoint resolution → marshalling → SigV4 → HTTP construction → mocked HTTP → unmarshalling → response mapping).
Coverage:

  • LOW sync: GetItem, PutItem
  • DOCUMENT sync: GetItem, PutItem
  • TYPED sync: GetItem, PutItem, Query (first page)
  • LOW async: GetItem (completion via join())
  • TYPED async: GetItem (completion via join())
    Shared deterministic fixture and operation-aware canned responses via existing sync MockHttpClient and MockAsyncHttpClient.

Tier D — Live DynamoDB

Coverage: LOW GetItem/PutItem; TYPED GetItem/PutItem/Query (first page).
Measures SDK + HTTP + network + DynamoDB service latency. Safety model: explicit opt-in before credentials/client/AWS calls; unique owned PAY_PER_REQUEST tables with ownership tags; teardown deletes only the trial-created table; lightweight retry observer (opt-out available); synthetic data only.

Docs / deps

  • test/sdk-benchmarks/DYNAMODB.md + README pointer (tiers, commands, live safety, interpretation)
  • junit (test) and service-test-utils (compile, with unused test-only transitive exclusions) for async mock HTTP

Methodology

  • Tier C: JMH AverageTime, µs, 5/5/2
  • Tier D: JMH SampleTime, ms, 3/5/1
  • Live LOW vs TYPED deltas are directional only (network/service dominate)

Deferred (intentionally out of scope)

CI/shard/baseline integration; async Put/Query and concurrency; broader DOCUMENT async/live; Batch/Transact; expanded parameter matrices.

Testing

  • sdk-benchmarks module build + checkstyle passed
  • Infrastructure and live-guard unit tests passed
  • Manual Tier C LOW / DOCUMENT / TYPED and async Get runs
  • Async Get under full 5/5/2 showed stable CV (~3–5%)
  • Live suite with opt-in: tables created and cleaned up; no retries/throttling in that run
  • Confirmed no changes to automated benchmark selection/execution paths
    Representative numbers from one validation environment only (not targets):
  • Tier C sync: ~30–35 µs/op
  • Tier C async Get: ~105–110 µs/op
  • Tier D live: ~70–72 ms/op

Screenshots (if appropriate)

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

Add deterministic mocked full-pipeline benches (LOW/DOCUMENT/TYPED,
sync + async Get) and opt-in live DynamoDB benches. Manual JMH only;
BenchmarkRunner, shards, baselines, and CI are unchanged.
@iulianbudau
iulianbudau requested a review from a team as a code owner August 21, 2026 14:25
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