Criterion 的输出在哪里,或者如何启用它?
Where is Criterion's output, or how do I enable it?
描述基准测试结果的Criterion benchmarking library for Rust is documented as generating plots:
Criterion.rs can generate a number of useful charts and graphs which you can check to get a better understanding of the behavior of the benchmark.
The plots and saved data are stored under target/criterion/$BENCHMARK_NAME/
.
但是,在 运行 cargo bench
并在终端上看到 Criterion 的输出后,我没有看到名为 target/criterion/
的目录。现在输出在哪里,或者我必须做什么才能激活它?
这是一个小错误 (criterion issue #192):当在 Cargo 工作区 中使用 Criterion 时,它找不到工作区的 target
目录,并最终将其结果写入 <individual crate directory>/target/criterion
。
货运扩展 cargo-criterion is supposed to work around this but unfortunately for my particular case, currently doesn't work on macOS (cargo-criterion issue #12)。
描述基准测试结果的Criterion benchmarking library for Rust is documented as generating plots:
Criterion.rs can generate a number of useful charts and graphs which you can check to get a better understanding of the behavior of the benchmark.
The plots and saved data are stored under
target/criterion/$BENCHMARK_NAME/
.
但是,在 运行 cargo bench
并在终端上看到 Criterion 的输出后,我没有看到名为 target/criterion/
的目录。现在输出在哪里,或者我必须做什么才能激活它?
这是一个小错误 (criterion issue #192):当在 Cargo 工作区 中使用 Criterion 时,它找不到工作区的 target
目录,并最终将其结果写入 <individual crate directory>/target/criterion
。
货运扩展 cargo-criterion is supposed to work around this but unfortunately for my particular case, currently doesn't work on macOS (cargo-criterion issue #12)。