Log build phase times for dev builds #9371
Merged
+46
−1
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.
↪️ Pull Request
This PR provides a summary of the total time spent in each build phase outputted at the end of the current CLIReporter output when ran with
PARCEL_SHOW_PHASE_TIMES=true
Currently Parcel's CLIReporter outputs the build times and sizes of each bundles. Parcel's tracer allows users to query how much time is spent in each phase of the build, however users have to remember to run the build with the
--trace
flag or addshouldTrace
Parcel options, upload the trace to Perfetto, and query the SQLite database for this basic information. The PR allows developers of Parcel easy access to this information by adding a new env variablePARCEL_SHOW_PHASE_TIMES
.💻 Examples
🚨 Test instructions
Tested by running a Jira build and seeing the information outputted to the console. Also tested by piping build output to a file (change
isTTY
). Tested on cached builds.✔️ PR Todo