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

Tracking Issue for JSON timings #10857

Open
1 task
Tracked by #84
ehuss opened this issue Jul 13, 2022 · 2 comments
Open
1 task
Tracked by #84

Tracking Issue for JSON timings #10857

ehuss opened this issue Jul 13, 2022 · 2 comments
Labels
A-timings Area: timings C-tracking-issue Category: A tracking issue for something unstable. S-waiting-on-feedback Status: An implemented feature is waiting on community feedback for bugs or design concerns.

Comments

@ehuss
Copy link
Contributor

ehuss commented Jul 13, 2022

Summary

Original issue: #7405
Implementation: #7311
Documentation: N/A

--timings=json is an unstable option which emits some JSON information about the build timings. It outputs one JSON object per rustc invocation defined in TimingInfo.

Unresolved Issues

  • Unclear if this is the right design or is useful. This was added experimentally without any real intent to use it. The concept was based on rustc's build system, which emits timing information using text. The idea was to provide something similar so that users can track their build times on a fine-grained basis. However, I think we are unlikely to use it in rustc in the foreseeable future.

Future Extensions

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

@ehuss ehuss added C-tracking-issue Category: A tracking issue for something unstable. A-timings Area: timings labels Jul 13, 2022
@repi
Copy link

repi commented Sep 11, 2022

we would love to have this to be able to build tools that diff build times our large Rust workspaces, both between ordinary code changes in PRs for the workspace as well as for dependency changes and rust upgrades.

That said, we haven't tested yet with the existing unstable support, but it does look like it is missing a lot of functionality that is in the HTML output, such as frontend/backend time split for each build, start time of build etc. Would like to have enough info in the JSON output to be able to recreate the output one currently have in the HTML

@ehuss ehuss added the S-waiting-on-feedback Status: An implemented feature is waiting on community feedback for bugs or design concerns. label Apr 25, 2023
@epage epage moved this to Unstable, no backers in Cargo Roadmap Sep 5, 2023
@smklein
Copy link

smklein commented Jan 25, 2024

This would be a great feature for automated tools to track differences between build speeds.

cargo build --timings, and the corresponding HTML report, are great for consumption by human eyeballs, but are a little rougher for machines to compare. cargo build --timings=json seems like a great tool, to, for example, "compare the time it takes to build a set of many packages in a workspace across all commits to a repo".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-timings Area: timings C-tracking-issue Category: A tracking issue for something unstable. S-waiting-on-feedback Status: An implemented feature is waiting on community feedback for bugs or design concerns.
Projects
Status: Unstable, no backers
Development

No branches or pull requests

3 participants