有没有办法对失败的测试进行 运行 基准测试?

Is there a way to run benchmarks with failing tests?

是否预期基准不会 运行 除非包中的所有测试都已通过。

我查看了 testing package doc and the testing flags,但我找不到只有在所有测试通过后才记录基准 运行。

有没有办法强制基准函数 运行 即使包中的某些测试失败了?

您可以使用 -run 标志跳过失败的测试,或者选择 运行 none

go test -bench . -run NONE