Skip to content

test(channel): add ecosystem performance baselines - #219

Merged
tisonkun merged 6 commits into
mainfrom
codex/channel-ecosystem-benchmarks
Aug 26, 2026
Merged

test(channel): add ecosystem performance baselines#219
tisonkun merged 6 commits into
mainfrom
codex/channel-ecosystem-benchmarks

Conversation

@tisonkun

@tisonkun tisonkun commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

  • add a standalone ecosystem benchmark target for the current bounded and unbounded MPSC APIs
  • compare ready round trips and 1/2/4/8-producer contention with Tokio, async-channel, and flume
  • organize Asyncband self-benchmarks and ecosystem comparisons as sibling suites, each grouped by primitive and operation
  • keep all peer implementations confined to benchmark dev dependencies

Closes #208.

Design Notes

This PR was stacked on #217; GitHub retargeted it to main after #217 merged.

The benchmark crate root contains only Cargo.toml. Asyncband self-benchmarks live under benchmarks/asyncband/<primitive>/<operation>.rs, while cross-project comparisons live under benchmarks/ecosystem/<primitive>/<operation>.rs. Shared setup stays in the nearest support.rs, and the existing self-benchmark scenarios remain unchanged.

Tokio is the closest MPSC peer. async-channel and flume expose MPMC receivers, so the suite measures them with one receiver and records that topology difference. The compared versions are Tokio 1.53.1, async-channel 2.5.0, and flume 0.12.0; Cargo.lock records the exact resolution.

Bounded channels use capacity 64. Concurrent cases move 16,384 usize messages from 1, 2, 4, or 8 producer threads to one consumer. Channel construction and worker lifecycle stay outside the timed section, and async paths are driven without installing a peer-specific runtime. Run the full workflow with cargo x bench, or focus this target with cargo bench -p benchmarks --bench ecosystem.

These comparisons are regression signals rather than a fastest-wins contest. A sustained result above 3x the closest semantic peer warrants investigation; an order-of-magnitude gap should block the implementation unless a documented semantic or resource tradeoff explains it.

Base automatically changed from codex/channel-source-layout to main August 26, 2026 16:50
Comment thread benchmarks/README.md Outdated
@tisonkun
tisonkun enabled auto-merge (squash) August 26, 2026 17:10
@tisonkun
tisonkun merged commit 37a394e into main Aug 26, 2026
9 checks passed
@tisonkun
tisonkun deleted the codex/channel-ecosystem-benchmarks branch August 26, 2026 17:13
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.

test(channel): establish ecosystem performance baselines

1 participant