dotnet/BenchmarkDotNet

Add CancellationToken support on non-async benchmark runner APIs

Geschlossen

#3.204 geöffnet am 22.07.2026

 (4 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C# (1.063 Forks)batch import
good first issueup-for-grabs

Repository-Metriken

Stars
 (11.472 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 5T 9h) (20 gemergte PRs in 30 T)

Beschreibung

Currently BenchmarkDotNet support CancellationToken on Async APIs.

It's also desirable to support CancellationToken on non-async APIs also on BenchmarkSwitcher/BenchmarkRunner.

Expected usage Use xUnit.v3's TestContext.Current.CancellationToken to run benchmarks. Without

Contributor Guide