Skip to content

Add WriteThroughput tracking for async code path#6697

Closed
zoewangg wants to merge 1 commit intofeature/master/writeThroughputMetricfrom
zoewang/writeThroughputAsync
Closed

Add WriteThroughput tracking for async code path#6697
zoewangg wants to merge 1 commit intofeature/master/writeThroughputMetricfrom
zoewang/writeThroughputAsync

Conversation

@zoewangg
Copy link
Copy Markdown
Contributor

Motivation and Context

This PR adds WRITE_THROUGHPUT metric support for the async client, completing the feature started in the sync client implementation. The
WRITE_THROUGHPUT metric measures the rate at which request body bytes are uploaded to the service (bytes/sec).

Modifications

  • Added BytesWrittenTrackingPublisher to wrap async request body and track bytes/timing (mirrors sync BytesWrittenTrackingInputStream)
  • Created RequestBodyMetrics container class to consolidate 3 execution attributes into 1, improving code organization
  • Moved request body metrics attribute from SdkInternalExecutionAttribute (protected API) to InternalCoreExecutionAttribute (internal API)
  • Updated async pipeline stages to initialize metrics and report WRITE_THROUGHPUT
  • Refactored sync implementation to use the new RequestBodyMetrics container

Testing

  • Unit tests for BytesWrittenTrackingPublisher
  • Reactive Streams TCK compliance tests
  • Functional tests with WireMock for both sync and async clients
  • S3 integration tests for sync and async putObject
  • JMH benchmark validated negligible overhead (<0.015% of network I/O time)

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.
  • My change is to implement 1.11 parity feature and I have updated [LaunchChangelog](https://github.com/aws/aws-sdk-java-v2/blob/master/
    docs/LaunchChangelog.md)

License

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

@zoewangg zoewangg requested a review from a team as a code owner January 29, 2026 22:56
@zoewangg zoewangg force-pushed the zoewang/writeThroughputAsync branch from 69a5438 to f0edb67 Compare January 29, 2026 22:57
@zoewangg zoewangg closed this Jan 29, 2026
@github-actions
Copy link
Copy Markdown

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 29, 2026
@zoewangg zoewangg deleted the zoewang/writeThroughputAsync branch January 29, 2026 23:04
@zoewangg zoewangg restored the zoewang/writeThroughputAsync branch January 29, 2026 23:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant