--bench-isolation=mode
配置基准文件隔离。当 mode 为 'process' 时,每个匹配的文件都会在单独的子进程中运行。这是默认设置。文件仍然是按顺序运行的,因此它们的测量工作不会重叠。
🌐 Configures benchmark file isolation. When mode is 'process', each matching
file runs in a separate child process. This is the default. Files are still run
serially so their measured work does not overlap.
当 mode 是 'none' 时,所有匹配的文件和基准测试都会在基准测试运行进程中串行运行。这会减少启动开销,但允许模块、堆和进程状态在文件之间保留。用户写入 stdout 或 stderr 在这种模式下也会与基准测试报告共享输出目的地。
🌐 When mode is 'none', all matching files and benchmarks run serially in the
benchmark runner process. This reduces startup overhead but allows module,
heap, and process state to carry between files. User writes to stdout or stderr
also share destinations with benchmark reporters in this mode.
支持的模式是 'process' 和 'none'。
🌐 The supported modes are 'process' and 'none'.