Skip to content

Share profile loggers between nested evaluations - #3885

Merged
lihaoyi merged 5 commits into
com-lihaoyi:mainfrom
lihaoyi:shared-profiles
Nov 1, 2024
Merged

Share profile loggers between nested evaluations#3885
lihaoyi merged 5 commits into
com-lihaoyi:mainfrom
lihaoyi:shared-profiles

Conversation

@lihaoyi

@lihaoyi lihaoyi commented Nov 1, 2024

Copy link
Copy Markdown
Member

We broaden the scope of profileLogger/chromeProfileLogger from within def evaluate to instead last as long as the Evaluator itself, and share it with any sub-Evaluators created e.g. to redirect output during show

Evaluator is now AutoCloseable, and needs to be closed after being used in MillBuildBootstrap and in UnitTester

For now I decided not to share the profilers between different evaluation levels of the meta-build, since they already don't overlap: one goes to out/, the parent to out/mill-build/, etc. We could do that if we think it would be useful to give people a consolidated profile, but it might be a bit more work (e.g. we would need to properly prefix entries in the profile to distinguish the different meta levels).

Added a unit test to ensure the show compile mill-profile and mill-chrome-profile contain the expected keys for both show and for compile and some of its upstream tasks

Fixes #3879

@lihaoyi
lihaoyi requested a review from lefou November 1, 2024 19:09

@lefou lefou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@lihaoyi
lihaoyi merged commit 3a36e60 into com-lihaoyi:main Nov 1, 2024
@lihaoyi lihaoyi added this to the 0.12.2 milestone Nov 1, 2024
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.

Evaluator commands duff out/mill-chrome-profile.json

2 participants