Skip to content

Commit 0206b52

Browse files
ivandev0Space Team
authored and
Space Team
committed
[CLI] Notify JS IR perf manager that compilation is started
#KT-67473 (cherry picked from commit 4e4a588)
1 parent 0eaf002 commit 0206b52

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt

+7
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
143143
paths: KotlinPaths?
144144
): ExitCode {
145145
val messageCollector = configuration.getNotNull(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY)
146+
val performanceManager = configuration[CLIConfigurationKeys.PERF_MANAGER]
146147

147148
val pluginLoadResult = loadPlugins(paths, arguments, configuration)
148149
if (pluginLoadResult != OK) return pluginLoadResult
@@ -248,6 +249,12 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
248249
return COMPILATION_ERROR
249250
}
250251

252+
performanceManager?.notifyCompilerInitialized(
253+
sourcesFiles.size,
254+
environmentForJS.countLinesOfCode(sourcesFiles),
255+
"$moduleName-${configurationJs[JSConfigurationKeys.MODULE_KIND]}"
256+
)
257+
251258
// TODO: Handle non-empty main call arguments
252259
val mainCallArguments = if (K2JsArgumentConstants.NO_CALL == arguments.main) null else emptyList<String>()
253260

0 commit comments

Comments
 (0)