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

Log build phase times for dev builds #9371

Merged
merged 7 commits into from Nov 15, 2023

Conversation

irismoini
Copy link
Contributor

@irismoini irismoini commented Nov 9, 2023

↪️ 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 add shouldTrace 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 variable PARCEL_SHOW_PHASE_TIMES.

💻 Examples

Screenshot 2023-11-09 at 6 31 41 PM

🚨 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

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@irismoini irismoini marked this pull request as draft November 10, 2023 00:07
@irismoini irismoini self-assigned this Nov 10, 2023
@irismoini irismoini force-pushed the imoini/P2X-1126-log-build-phase-times branch 3 times, most recently from 6ac086d to f41f30a Compare November 13, 2023 19:58
@irismoini irismoini force-pushed the imoini/P2X-1126-log-build-phase-times branch from f41f30a to 999c0c2 Compare November 13, 2023 20:01
@irismoini irismoini marked this pull request as ready for review November 13, 2023 20:53
@mischnic
Copy link
Member

This additional output should be behind some flag, most people won't care about this and/or have only have small projects. As you said

The PR allows developers of Parcel

maybe some env variable (like the other "internal" PARCEL_DUMP_GRAPHVIZ)?

@irismoini irismoini merged commit fc67a77 into v2 Nov 15, 2023
14 of 16 checks passed
@irismoini irismoini deleted the imoini/P2X-1126-log-build-phase-times branch November 15, 2023 22:37
@irismoini irismoini changed the title Log build phase times Log build phase times for dev builds Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants