dotnet/BenchmarkDotNet

Add CancellationToken support on non-async benchmark runner APIs

已关闭

#3,204 创建于 2026年7月22日

 (4 条评论) (0 个反应) (1 位负责人)C# (1,063 个派生)batch import
good first issueup-for-grabs

仓库指标

星标
 (11,472 个星标)
PR 合并指标
 (平均合并 5天 9小时) (30 天内合并 20 个 PR)

描述

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

贡献者指南