mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Added --profiling.
This commit is contained in:
parent
f8d2d0ed23
commit
888e5cde73
3 changed files with 17 additions and 5 deletions
|
@ -213,7 +213,14 @@ private class Main @Inject constructor(
|
|||
// Shutdown all plug-ins
|
||||
plugins.shutdownPlugins()
|
||||
|
||||
log(3, "Timings:\n " + runTargetResult.messages.joinToString("\n "))
|
||||
if (args.profiling) {
|
||||
log(1, "\nTIMINGS (SECONDS)")
|
||||
log(1, "================\n")
|
||||
runTargetResult.timings.sortedByDescending { it.durationMillis }.forEach {
|
||||
log(1, String.format("%.2f", it.durationMillis.toDouble() / 1000) + " " + it.taskName)
|
||||
}
|
||||
log(1, "\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue