Skip to content

perf/bench: remove unnecessary heap allocs in asio accept_churn benches#237

Merged
mvandeberg merged 1 commit intocppalliance:developfrom
mvandeberg:pr/bench-alloc-fix
Apr 21, 2026
Merged

perf/bench: remove unnecessary heap allocs in asio accept_churn benches#237
mvandeberg merged 1 commit intocppalliance:developfrom
mvandeberg:pr/bench-alloc-fix

Conversation

@mvandeberg
Copy link
Copy Markdown
Contributor

Replace unique_ptr<tcp_socket> with value-typed sockets across all asio accept_churn benchmarks (coroutine and callback variants). Vectors are pre-reserved so no reallocation invalidates references held by pending async operations. This matches the corosio benchmark's allocation pattern for an apples-to-apples comparison.

Replace unique_ptr<tcp_socket> with value-typed sockets across all asio
accept_churn benchmarks (coroutine and callback variants). Vectors are
pre-reserved so no reallocation invalidates references held by pending
async operations. This matches the corosio benchmark's allocation
pattern for an apples-to-apples comparison.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • perf/bench/asio/callback/accept_churn_bench.cpp is excluded by !**/bench/**
  • perf/bench/asio/coroutine/accept_churn_bench.cpp is excluded by !**/bench/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5037e8d2-3900-4bab-8529-73eda373ff63

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cppalliance-bot
Copy link
Copy Markdown

An automated preview of the documentation is available at https://237.corosio.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-04-21 21:47:33 UTC

@mvandeberg mvandeberg merged commit e68feb4 into cppalliance:develop Apr 21, 2026
40 checks passed
@mvandeberg mvandeberg deleted the pr/bench-alloc-fix branch April 21, 2026 21:57
@cppalliance-bot
Copy link
Copy Markdown

GCOVR code coverage report https://237.corosio.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://237.corosio.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://237.corosio.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-04-21 21:57:59 UTC

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.71%. Comparing base (e49d180) to head (584784e).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #237   +/-   ##
========================================
  Coverage    77.71%   77.71%           
========================================
  Files           96       96           
  Lines         7298     7298           
  Branches      1787     1787           
========================================
  Hits          5672     5672           
  Misses        1108     1108           
  Partials       518      518           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e49d180...584784e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants