Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--timings interacts poorly with cargo clean #10410

Open
g2p opened this issue Feb 22, 2022 · 1 comment
Open

--timings interacts poorly with cargo clean #10410

g2p opened this issue Feb 22, 2022 · 1 comment
Labels
A-timings Area: timings C-bug Category: bug Command-clean

Comments

@g2p
Copy link
Contributor

g2p commented Feb 22, 2022

Problem

The stabilization PR (#10245) for --timings / -Ztimings moved html reports under target/cargo-timings, which is wiped on cargo clean.

Getting reports for a clean build generally requires cargo clean, but this choice of directory makes it hard to keep reports over time, which one would need to measure progress.

Steps

Attempting to track build performance over time

  1. cargo clean; cargo build --timings
  2. Change something, try to impact build performance
  3. cargo clean; cargo build --timings
  4. Previous reports were wiped and can't be compared

Possible Solution(s)

Consider:
Using a directory outside target. reports/cargo-timings/ would work.

Making cargo clean delete only known subsets of the target directory.

A new flag, cargo clean --debug, similar to cargo clean --release, might provide a way to benchmark clean debug builds with less risk (as long as the flags are used every time).

Version

cargo +nightly version
cargo 1.61.0-nightly (ea2a21c 2022-02-15)
@g2p g2p added the C-bug Category: bug label Feb 22, 2022
@ehuss
Copy link
Contributor

ehuss commented Feb 22, 2022

A new flag, cargo clean --debug, similar to cargo clean --release, might provide a way to benchmark clean debug builds with less risk (as long as the flags are used every time).

cargo clean --profile=dev will only delete the dev profile directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-timings Area: timings C-bug Category: bug Command-clean
Projects
None yet
Development

No branches or pull requests

3 participants