Gradle plugin that prints the time taken by the tasks in a build. Requires Java 8 or later.
== Build time summary ==
:commons:extractIncludeProto | 4S | 14% | ████
:commons:compileKotlin | 2S | 7% | ██
:commons:compileJava | 6S | 21% | ██████
:service-client:compileKotlin | 1S | 4% | █
:webapp:compileKotlin | 1S | 4% | █
:webapp:dockerBuildImage | 4S | 14% | ████
:webapp:dockerPushImage | 4S | 14% | ████
See Gradle Plugin Portal for usage instructions.
If you are the fiddling type, you can customize the plugin as follows:
buildTimeTracker {
barPosition = TRAILING or LEADING, default is TRAILING
sort = false or true, default is false
output = CONSOLE or CSV, default is CONSOLE
maxWidth = 120, default is 80
minTaskDuration = Duration.ofSeconds(1), don't show tasks that take less than a second to execute
showBars = false or true, default is true
reportsDir = only relevant if output = CSV, default $buildDir/reports/buildTimeTracker
}
If you are using Kotlin build script, set the configuration properties using
property.set()
method.
ℹ️ Due to a Gradle limitation , the build duration can't be calculated precisely. The bars and percentages are rounded off such that the output provides a good indication of how long individual tasks took to complete relative to the build, but are not meant to be correct up to the milliseconds.
ℹ️ It is sufficient to apply the plugin to the root project; applying to subprojects will result in duplication of the report.
This project is a volunteer effort. You are welcome to send pull requests, ask questions, or create issues. If you like it, you can help by spreading the word and "Starring" the GitHub repo!
Copyright 2021 Abhijit Sarkar - Released under Apache License v2.0.