Cargo build --timings > csv / sqlite format?

I want to visualize the output of cargo build --timings differently from the current output.

Is there a way to have it dump a sqlite / csv file I can parse / visualize myself? I am looking for the following:

for each crate, have a row containing:

  1. crates it depends on
  2. when it started parsing
  3. when it finished parsing / started codegen
  4. when it finished codegen

I think that's about all I need.

Thanks!

Based on this, you can get it in JSON. I didn't check to see the details.

--timings= fmts
Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timings without an argument will default to --timings=html. Specifying an output format (rather than the default) is unstable and requires -Zunstable-options. Valid output formats:

  • html (unstable, requires -Zunstable-options): Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. Also write a report to the same directory with a timestamp in the filename if you want to look at older runs. HTML output is suitable for human consumption only, and does not provide machine-readable timing data.
  • json (unstable, requires -Zunstable-options): Emit machine-readable JSON information about timing information.
1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.