Skip to content

Commit

Permalink
[CLI] Notify JS IR perf manager that compilation is started
Browse files Browse the repository at this point in the history
#KT-67473
  • Loading branch information
ivandev0 authored and Space Team committed Apr 25, 2024
1 parent a8a0f10 commit 4e4a588
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
paths: KotlinPaths?
): ExitCode {
val messageCollector = configuration.getNotNull(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY)
val performanceManager = configuration[CLIConfigurationKeys.PERF_MANAGER]

val targetVersion = arguments.targetVersion?.also {
configuration.put(JSConfigurationKeys.TARGET, it)
Expand Down Expand Up @@ -291,6 +292,10 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
return COMPILATION_ERROR
}

performanceManager?.notifyCompilerInitialized(
sourcesFiles.size, environmentForJS.countLinesOfCode(sourcesFiles), "$moduleName-$moduleKind"
)

// TODO: Handle non-empty main call arguments
val mainCallArguments = if (K2JsArgumentConstants.NO_CALL == arguments.main) null else emptyList<String>()

Expand Down

0 comments on commit 4e4a588

Please sign in to comment.