Build Start Time #45
Replies: 2 comments 3 replies
-
|
https://docs.gradle.org/8.0/release-notes.html#configuration-cache
Thus, the difference between first and subsequent runs shown above no longer exists. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @asarkar, thanks for this awesome plugin! I have a quick question: Just wanted to confirm if this assumption is right. Thanks again for your work! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Believe it or not, Gradle has never been able to tell precisely when the build started 😒.
This got worse with the introduction of Configuration Cache in Gradle 6.6, which made it illegal to use a
BuildListener😖. Previously, thebuild-time-trackerplugin used one of theBuildListenermethods for an approximation of build started.To their credit, Gradle has improved the Configuration Cache documentation, but it really seems that this feature was introduced without much impact analysis and migration guidance for plugin authors. 👎
gradle/gradle#18520
Thus, beginning with version 4.3.0, ⭐
build-time-trackerno longer includes the time taken for the configuration phase⭐, and uses the oldest task start time as the build start time. In a way, this makes sense, because of the following reasons:If you've a comment or concern, please comment below. Also consider upvoting the issue above ☝️
Here's an example of using Configuration Cache and the tasks sorted in descending order of time taken:
Execution 1:
Build duration is 3 seconds.
Execution 2:
Build duration is 2, not 3, seconds. This is because with Configuration Cache enabled, all tasks run in parallel by default.
Beta Was this translation helpful? Give feedback.
All reactions