Skip to content

Add a BenchmarkDotNet project to lock in and track performance #339

Description

@thomhurst

Problem

PR #332's performance claims (unbounded 61→16 ms, rate-limited 163→8.7 ms at 100k items, 444→162 B/item) were measured with a throwaway scratchpad harness. Nothing in the repo can reproduce them or catch a regression.

Proposal

Add a benchmarks/ project using BenchmarkDotNet:

  • Scenarios: unbounded parallel, throttled (maxConcurrency), rate-limited, timed rate-limited, batch, one-at-a-time, result streaming (GetResultsAsyncEnumerable) — each at 1k/10k/100k items with completed-task selectors (pure overhead) and Task.Yield selectors (dispatch cost).
  • [MemoryDiagnoser] for per-item allocation tracking.
  • A short doc section on how to run and how to compare against a baseline (--filter, BenchmarkSwitcher).
  • Optional follow-up: a manual CI workflow that runs the suite and posts results, so PRs with perf implications have numbers.

Acceptance criteria

  • dotnet run -c Release --project benchmarks produces the suite.
  • README or CONTRIBUTING points at it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions