Skip to content

Add a "cargo bench --debug" optionΒ #6445

Closed
@asomers

Description

@asomers

A mere cargo test neither compiles nor runs the benchmarks. In order to keep them from bitrotting, they must be built and run in CI. But release builds take much more time and RAM than debug builds. In a CI situation, the benchmark results aren't important; only the fact that they can run without errors. So it would be very helpful if there were a cargo bench --debug option

The closest that can be done right now is to do cargo build --benches && target/debug/<my_benchmark>-*. That usage is problematic because

  1. The CI script must be updated everytime a new benchmark program is added, and
  2. That invocation will run old, stale binaries, too.

Instead, it would be great if cargo had a single cargo bench --debug command that would build the benchmarks in debug mode and then run them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cargo-targetsArea: selection and definition of targets (lib, bins, examples, tests, benches)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions