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

Share profile loggers between nested evaluations #3885

Merged
merged 5 commits into from
Nov 1, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Nov 1, 2024

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
Copy link
Member

@lefou lefou left a comment

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
24 checks passed
@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