Skip to content

test: add GET response serialization microbench - #18

Closed
houseme wants to merge 1 commit into
mainfrom
houseme/get-response-serializer-bench
Closed

houseme wants to merge 1 commit into
mainfrom
houseme/get-response-serializer-bench

Conversation

@houseme

@houseme houseme commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add an ignored focused microbenchmark for GetObject::serialize_http.
  • Split the GET response construction path into empty response, stream body setup, common headers, timestamp formatting, and user metadata cases.
  • Keep the benchmark inside ops unit tests so it can exercise the private generated serializer without exposing new public API.

Verification

  • cargo fmt --all --check
  • git diff --check
  • cargo clippy -p s3s --features minio --tests
  • cargo test -p s3s --features minio get_object_response_serialization_microbench -- --ignored --nocapture
  • cargo test -p s3s --features minio --release get_object_response_serialization_microbench -- --ignored --nocapture

Notes

  • This is a diagnostic benchmark only; it does not change production behavior.
  • The benchmark reports elapsed ns/op and average response header count. It intentionally avoids adding allocator instrumentation or public benchmarking API.

Co-Authored-By: heihutu <heihutu@gmail.com>
@houseme

houseme commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

CI note after the first run:

  • rust (stable), rust (1.96.0), coverage, cross-test (macos-latest), cross-test (windows-latest), wasm-test, python, and skip-check passed.
  • rust (nightly) failed on existing generated async_trait/#[must_use] Clippy double_must_use diagnostics outside this PR's changed file.
  • semver-checks failed on existing public checksum fields in generated DTOs/checksum structs versus the published 0.14.1 baseline; this PR only changes crates/s3s/src/ops/tests.rs.

This PR adds an ignored diagnostic microbenchmark only and does not change public API or production behavior.

@houseme houseme closed this Aug 17, 2026
@houseme
houseme deleted the houseme/get-response-serializer-bench branch August 17, 2026 10:10
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