I use crate pprof-rs to bench_storage.rs in branch pprof-rs with commit 57a713 。
produce this is the error
warning: `benchmarks` (bench "bench_storage") generated 1 warning
Finished bench [optimized] target(s) in 0.74s
Running unittests (/Users/yesonggao/starcoin.comment/target/release/deps/bench_storage-0f5fb700537357ac)
WARNING: HTML report generation will become a non-default optional feature in Criterion.rs 0.4.0.
This feature is being moved to cargo-criterion (https://github.com/bheisler/cargo-criterion) and will be optional in a future version of Criterion.rs. To silence this warning, either switch to cargo-criterion or enable the 'html_reports' feature in your Cargo.toml.
Gnuplot not found, using plotters backend
Benchmarking accumulator_append: Profiling for 10.000 s2021-10-26T15:40:18.400545+08:00 INFO pprof::profiler::/Users/yesonggao/.cargo/registry/src/github.com-1ecc6299db9ec823/pprof-0.4.4/src/profiler.rs::164 - starting cpu profiler
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: write batch db error: IO error: No such file or directory: While open a file for appending: /var/folders/yw/g0zm8vb56ls0j8nk2vzjw1br0000gn/T/f8e93e0bf20b2812536cddb355f52c4f/starcoindb/000038.log: No such file or directory, prefix_name acc_node_transaction', benchmarks/benches/bench_storage.rs:62:31
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2021-10-26T15:40:24.892888+08:00 INFO pprof::profiler::/Users/yesonggao/.cargo/registry/src/github.com-1ecc6299db9ec823/pprof-0.4.4/src/profiler.rs::184 - stopping cpu profiler
error: bench failed
yesonggao@MacBook-Pro benchmarks % cargo bench --bench bench_storage -- --profile-time=10
Compiling benchmarks v1.8.0-alpha (/Users/yesonggao/starcoin.comment/benchmarks)
warning: function is never used: `accumulator_append`
--> benchmarks/benches/bench_storage.rs:37:4
|
37 | fn accumulator_append(c: &mut Criterion) {
| ^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: function is never used: `create_leaves`
--> benchmarks/benches/bench_storage.rs:69:4
|
69 | fn create_leaves(nums: std::ops::Range<usize>) -> Vec<HashValue> {
| ^^^^^^^^^^^^^
warning: `benchmarks` (bench "bench_storage") generated 2 warnings
Finished bench [optimized] target(s) in 5.09s
Running unittests (/Users/yesonggao/starcoin.comment/target/release/deps/bench_storage-0f5fb700537357ac)
WARNING: HTML report generation will become a non-default optional feature in Criterion.rs 0.4.0.
This feature is being moved to cargo-criterion (https://github.com/bheisler/cargo-criterion) and will be optional in a future version of Criterion.rs. To silence this warning, either switch to cargo-criterion or enable the 'html_reports' feature in your Cargo.toml.
Gnuplot not found, using plotters backend
Benchmarking storage_transaction: Profiling for 10.000 s2021-10-26T16:02:24.446710+08:00 INFO pprof::profiler::/Users/yesonggao/.cargo/registry/src/github.com-1ecc6299db9ec823/pprof-0.4.4/src/profiler.rs::164 - starting cpu profiler
2021-10-26T16:02:36.038639+08:00 INFO pprof::profiler::/Users/yesonggao/.cargo/registry/src/github.com-1ecc6299db9ec823/pprof-0.4.4/src/profiler.rs::184 - stopping cpu profiler
Benchmarking storage_transaction: Complete (Analysis Disabled)
I use crate pprof-rs to bench_storage.rs in branch pprof-rs with commit 57a713 。 produce this is the error
if use storage_transaction https://github.com/starcoinorg/starcoin/blob/pprof-rs/benchmarks/benches/bench_storage.rs#L78 can correct work this is the log