mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Incremental compilation timing.
This commit is contained in:
parent
c3fc091347
commit
c90125ede0
1 changed files with 12 additions and 5 deletions
|
@ -224,12 +224,19 @@ class KotlinCompiler @Inject constructor(
|
|||
|
||||
val result =
|
||||
if (cliArgs.noIncrementalKotlin) {
|
||||
log(2, "Kotlin incremental compilation is disabled")
|
||||
val exitCode = K2JVMCompiler().exec(collector, Services.Builder().build(), args)
|
||||
TaskResult(exitCode == ExitCode.OK)
|
||||
log(2, " Kotlin incremental compilation is disabled")
|
||||
val duration = benchmarkMillis {
|
||||
K2JVMCompiler().exec(collector, Services.Builder().build(), args)
|
||||
}
|
||||
log(1, " Regular compilation time: ${duration.first} ms")
|
||||
TaskResult(duration.second == ExitCode.OK)
|
||||
} else {
|
||||
log(2, "Kotlin incremental compilation is enabled")
|
||||
compileIncrementally(filesToCompile, sourceFiles, outputDir, info, args, collector)
|
||||
log(1, " Kotlin incremental compilation is enabled")
|
||||
val start = System.currentTimeMillis()
|
||||
val duration = benchmarkMillis {
|
||||
compileIncrementally(filesToCompile, sourceFiles, outputDir, info, args, collector)
|
||||
}
|
||||
log(1, " Incremental compilation time: ${duration.first} ms")
|
||||
TaskResult()
|
||||
}
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue