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 =
|
val result =
|
||||||
if (cliArgs.noIncrementalKotlin) {
|
if (cliArgs.noIncrementalKotlin) {
|
||||||
log(2, "Kotlin incremental compilation is disabled")
|
log(2, " Kotlin incremental compilation is disabled")
|
||||||
val exitCode = K2JVMCompiler().exec(collector, Services.Builder().build(), args)
|
val duration = benchmarkMillis {
|
||||||
TaskResult(exitCode == ExitCode.OK)
|
K2JVMCompiler().exec(collector, Services.Builder().build(), args)
|
||||||
|
}
|
||||||
|
log(1, " Regular compilation time: ${duration.first} ms")
|
||||||
|
TaskResult(duration.second == ExitCode.OK)
|
||||||
} else {
|
} else {
|
||||||
log(2, "Kotlin incremental compilation is enabled")
|
log(1, " Kotlin incremental compilation is enabled")
|
||||||
compileIncrementally(filesToCompile, sourceFiles, outputDir, info, args, collector)
|
val start = System.currentTimeMillis()
|
||||||
|
val duration = benchmarkMillis {
|
||||||
|
compileIncrementally(filesToCompile, sourceFiles, outputDir, info, args, collector)
|
||||||
|
}
|
||||||
|
log(1, " Incremental compilation time: ${duration.first} ms")
|
||||||
TaskResult()
|
TaskResult()
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue