Hello everyone,
I encountered an error while benchmarking 'vec' and 'vec_deque' in Rust. I attempted to use 'vec_deque.rs' and 'vec.rs' from 'rust/library/alloc/benches' and added the following code to my 'Cargo.toml' file.
[[bench]]
name = "vec_deque_bench"
path = "benches/vec_deque.rs"
harness = false
[[bench]]
name = "vec_bench"
path = "benches/vec.rs"
harness = false
I then tried to run the benchmarks with the following commands:
cargo bench --bench vec_bench
cargo bench --bench vec_deque_bench
Unfortunately, the benchmarks failed, and I received a lengthy error message. After investigating, I concluded that I cannot directly modify the user code.
I will attach part of the error for reference.
- In response to the suggestion that the version might be the issue, I've updated Rust, and my current version is rustc 1.74.0-nightly (9f5fc1bd4 2023-09-02).
How can I resolve this issue? Or are there any alternative benchmarking methods available?