feat(report): new command cargo report sessions
#16428
Open
+479
−81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
A new report command
cargo report sessionsis added.The motivation of this is to provide an access to the build session ID,
so that user can retrieve reports for specific session.
For example,
cargo report timings --id <my-older-build>.The command name
sessionswas chosen becausefeeling more reasonable than
cargo report list-runsor
cargo rebuild recent-builds.@Muscraft,and we feel
SessionIdwill be a better term inRunId.While whether a
cargoinvocation is a session is debatable,sessions the term is widely used for logging and metrics.
Part of #15844
Fixes #16401
How to test and review this PR?
See tests for the report output.
It is a simple text-based report. JSON schema is not included.