Add Kotlin daemon memory usage into build report

#KT-56211: Fixed
This commit is contained in:
nataliya.valtman
2023-02-10 12:45:32 +01:00
committed by Space Team
parent f0fba7be64
commit c16dabba1f
5 changed files with 21 additions and 5 deletions
@@ -81,7 +81,7 @@ interface CompileService : Remote {
fun checkCompilerId(expectedCompilerId: CompilerId): Boolean
@Throws(RemoteException::class)
fun getUsedMemory(): CallResult<Long>
fun getUsedMemory(withGC: Boolean = true): CallResult<Long>
@Throws(RemoteException::class)
fun getDaemonOptions(): CallResult<DaemonOptions>
@@ -723,8 +723,8 @@ class CompileServiceImpl(
(compilerId.compilerClasspath.all { expectedCompilerId.compilerClasspath.contains(it) }) &&
!classpathWatcher.isChanged
override fun getUsedMemory(): CompileService.CallResult<Long> =
ifAlive { CompileService.CallResult.Good(usedMemory(withGC = true)) }
override fun getUsedMemory(withGC: Boolean): CompileService.CallResult<Long> =
ifAlive { CompileService.CallResult.Good(usedMemory(withGC = withGC)) }
override fun shutdown(): CompileService.CallResult<Nothing> = ifAliveExclusive(minAliveness = Aliveness.LastSession) {
shutdownWithDelay()