Build: output build time for tasks with --info
To minimize the amount of output during project build, to make it more comfortable to work with the project in the terminal.
This commit is contained in:
@@ -94,14 +94,14 @@ private class BuildTimeReporter(
|
||||
val totalTimeSec = totalTimeNs.toDouble() / secondInNs
|
||||
if (totalTimeSec < 1) return
|
||||
|
||||
log.warn("Build time for tasks:")
|
||||
log.info("Build time for tasks:")
|
||||
for (category in TaskCategory.values()) {
|
||||
val timeNs = categoryTimeNs[category] ?: 0L
|
||||
val timeSec = timeNs.toDouble() / secondInNs
|
||||
if (timeSec < 1) continue
|
||||
|
||||
val percent = timeSec / totalTimeSec * 100
|
||||
log.warn("${category.description()}: ${timeSec.asShortString()}s (${percent.asShortString()}% of total time)")
|
||||
log.info("${category.description()}: ${timeSec.asShortString()}s (${percent.asShortString()}% of total time)")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user