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

feat: measure configuration phase duration #27

Merged
merged 7 commits into from
Dec 22, 2023
Merged

Conversation

wzieba
Copy link
Member

@wzieba wzieba commented Dec 20, 2023

Description

This PR adds a new metric, configuration-duration, to measure time spent on initialization and configuration of Android builds.

How does it work?

If project#afetEvaluate is executed, it means that the configuration phase was executed. Then, ConfigurationPhaseObserver#init is called and ConfigurationPhaseObserver#obtain returns true, and resets its internal state to false immediately after.

If project#afetEvaluate is not executed, it means that the build used the Configuration Cache feature. Because we reset the internal state of ConfigurationPhaseObserver to false, it will return false in case of being retrieved from Configuration Cache, giving the expected result.

The value of Configuration Phase duration is calculated via subtracting the build initiation time, provided by BuildStartedTime, and build start time, assigned in constructor of BuildTaskService.

@wzieba wzieba added the enhancement New feature or request label Dec 22, 2023
@wzieba wzieba merged commit fcfa58c into main Dec 22, 2023
7 checks passed
@wzieba wzieba deleted the measure-configuration-time branch December 22, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant