diff --git a/java/debugger/impl/src/com/intellij/debugger/statistics/StatisticsStorage.kt b/java/debugger/impl/src/com/intellij/debugger/statistics/StatisticsStorage.kt index 050c087d6e8b..be76712bc5cb 100644 --- a/java/debugger/impl/src/com/intellij/debugger/statistics/StatisticsStorage.kt +++ b/java/debugger/impl/src/com/intellij/debugger/statistics/StatisticsStorage.kt @@ -118,7 +118,7 @@ enum class ThreadDumpStatus { PLATFORM_DUMP_EXTENDED_DUMP_DISABLED, } -val THREAD_DUMP_TRIGGERING_EXCEPTIONS_TO_LOG = listOf( +val THREAD_DUMP_TRIGGERING_EXCEPTIONS_TO_LOG: List = listOf( "java.io.InterruptedIOException", "java.lang.IllegalMonitorStateException", "java.sql.SQLTransientConnectionException", @@ -150,4 +150,4 @@ val THREAD_DUMP_TRIGGERING_EXCEPTIONS_TO_LOG = listOf( // Kotlin "kotlinx.coroutines.TimeoutCancellationException", -) \ No newline at end of file +) diff --git a/platform/ml-impl/src/com/intellij/platform/ml/impl/logs/ComponentAsFusEventRegister.kt b/platform/ml-impl/src/com/intellij/platform/ml/impl/logs/ComponentAsFusEventRegister.kt index b1f77309ad23..7d3bceb6f80e 100644 --- a/platform/ml-impl/src/com/intellij/platform/ml/impl/logs/ComponentAsFusEventRegister.kt +++ b/platform/ml-impl/src/com/intellij/platform/ml/impl/logs/ComponentAsFusEventRegister.kt @@ -14,21 +14,15 @@ import com.intellij.platform.ml.logs.MLSessionComponentRegister import com.intellij.platform.ml.logs.schema.EventPair import org.jetbrains.annotations.ApiStatus import com.intellij.internal.statistic.eventLog.EventLogGroup as IJEventLogGroup -import com.intellij.internal.statistic.eventLog.events.BooleanEventField as IJBooleanEventField import com.intellij.internal.statistic.eventLog.events.ClassEventField as IJClassEventField -import com.intellij.internal.statistic.eventLog.events.DoubleEventField as IJDoubleEventField import com.intellij.internal.statistic.eventLog.events.EnumEventField as IJEnumEventField import com.intellij.internal.statistic.eventLog.events.EventField as IJEventField import com.intellij.internal.statistic.eventLog.events.EventFields as IJEventFields import com.intellij.internal.statistic.eventLog.events.EventPair as IJEventPair -import com.intellij.internal.statistic.eventLog.events.FloatEventField as IJFloatEventField1 -import com.intellij.internal.statistic.eventLog.events.IntEventField as IJIntEventField -import com.intellij.internal.statistic.eventLog.events.LongEventField as IJLongEventField import com.intellij.internal.statistic.eventLog.events.ObjectDescription as IJObjectDescription import com.intellij.internal.statistic.eventLog.events.ObjectEventData as IJObjectEventData import com.intellij.internal.statistic.eventLog.events.ObjectEventField as IJObjectEventField import com.intellij.internal.statistic.eventLog.events.ObjectListEventField as IJObjectListEventField -import com.intellij.internal.statistic.eventLog.events.StringEventField as IJStringEventField import com.intellij.platform.ml.impl.logs.CustomEventField as MLCustomEventField import com.intellij.platform.ml.impl.logs.LanguageEventField as MLLanguageEventField import com.intellij.platform.ml.impl.logs.VersionEventField as MLVersionEventField @@ -74,14 +68,14 @@ private fun createConverter(mlEventField: MLEventField): IJEventPairConve mlEventField.descriptionProvider, mlEventField.objectDescription ) as IJEventPairConverter - is MLBooleanEventField -> ConverterOfPrimitiveType(mlEventField) { n, d -> IJBooleanEventField(n, d()) } as IJEventPairConverter - is MLIntEventField -> ConverterOfPrimitiveType(mlEventField) { n, d -> IJIntEventField(n, d()) } as IJEventPairConverter - is MLLongEventField -> ConverterOfPrimitiveType(mlEventField) { n, d -> IJLongEventField(n, d()) } as IJEventPairConverter - is MLFloatEventField -> ConverterOfPrimitiveType(mlEventField) { n, d -> IJFloatEventField1(n, d()) } as IJEventPairConverter + is MLBooleanEventField -> ConverterOfPrimitiveType(mlEventField) { n, d -> IJEventFields.Boolean(n, d()) } as IJEventPairConverter + is MLIntEventField -> ConverterOfPrimitiveType(mlEventField) { n, d -> IJEventFields.Int(n, d()) } as IJEventPairConverter + is MLLongEventField -> ConverterOfPrimitiveType(mlEventField) { n, d -> IJEventFields.Long(n, d()) } as IJEventPairConverter + is MLFloatEventField -> ConverterOfPrimitiveType(mlEventField) { n, d -> IJEventFields.Float(n, d()) } as IJEventPairConverter is MLEnumEventField<*> -> mlEventField.toIJConverter() as IJEventPairConverter is MLClassEventField -> ConverterOfClass(mlEventField) as IJEventPairConverter is MLObjectListEventField -> ConvertObjectList(mlEventField) as IJEventPairConverter - is MLDoubleEventField -> ConverterOfPrimitiveType(mlEventField) { n, d -> IJDoubleEventField(n, d()) } as IJEventPairConverter + is MLDoubleEventField -> ConverterOfPrimitiveType(mlEventField) { n, d -> IJEventFields.Double(n, d()) } as IJEventPairConverter is MLVersionEventField -> ConverterOfVersion(mlEventField) as IJEventPairConverter is MLLanguageEventField -> ConverterOfLanguage(mlEventField) as IJEventPairConverter is MLStringEventField -> ConverterOfString(mlEventField) as IJEventPairConverter @@ -112,7 +106,7 @@ private class ConverterOfCustom(mlEventField: MLCustomEventField) : IJEven } private class ConverterOfString(mlEventField: MLStringEventField) : IJEventPairConverter { - override val ijEventField: IJEventField = IJStringEventField.ValidatedByAllowedValues( + override val ijEventField: IJEventField = IJEventFields.String( mlEventField.name, allowedValues = mlEventField.possibleValues, description = mlEventField.descriptionProvider() diff --git a/platform/non-modal-welcome-screen/src/com/intellij/platform/ide/nonModalWelcomeScreen/newProjectNotification/WelcomeScreenOpenFileNotificationProvider.kt b/platform/non-modal-welcome-screen/src/com/intellij/platform/ide/nonModalWelcomeScreen/newProjectNotification/WelcomeScreenOpenFileNotificationProvider.kt index 975882ce6a6c..021d5f0698ad 100644 --- a/platform/non-modal-welcome-screen/src/com/intellij/platform/ide/nonModalWelcomeScreen/newProjectNotification/WelcomeScreenOpenFileNotificationProvider.kt +++ b/platform/non-modal-welcome-screen/src/com/intellij/platform/ide/nonModalWelcomeScreen/newProjectNotification/WelcomeScreenOpenFileNotificationProvider.kt @@ -19,10 +19,6 @@ import com.intellij.openapi.wm.ex.WelcomeScreenProjectProvider.Companion.isWelco import com.intellij.platform.PlatformProjectOpenProcessor.Companion.createOptionsToOpenDotIdeaOrCreateNewIfNotExists import com.intellij.platform.ide.nonModalWelcomeScreen.NonModalWelcomeScreenBundle import com.intellij.platform.ide.nonModalWelcomeScreen.WelcomeScreenAppScopeHolder -import com.intellij.platform.ide.nonModalWelcomeScreen.newProjectNotification.WelcomeScreenSingleFileOpeningCollector.logNotificationClosed -import com.intellij.platform.ide.nonModalWelcomeScreen.newProjectNotification.WelcomeScreenSingleFileOpeningCollector.logNotificationOpenButtonClicked -import com.intellij.platform.ide.nonModalWelcomeScreen.newProjectNotification.WelcomeScreenSingleFileOpeningCollector.logNotificationShown -import com.intellij.platform.ide.nonModalWelcomeScreen.newProjectNotification.WelcomeScreenSingleFileOpeningCollector.logNotificationSuppressed import com.intellij.testFramework.LightVirtualFile import com.intellij.ui.EditorNotificationPanel import com.intellij.ui.EditorNotificationProvider @@ -118,12 +114,12 @@ abstract class WelcomeScreenOpenFileNotificationProvider : EditorNotificationPro val projectRootInfo = selectProjectRoot(file) if (projectRootInfo.result == ProjectRootResult.SUPPRESS_NOTIFICATION) { - logNotificationSuppressed() + WelcomeScreenSingleFileOpeningCollector.logNotificationSuppressed() return null } - projectRootInfo.result.asOpeningStrategy { logNotificationShown(it) } + projectRootInfo.result.asOpeningStrategy { WelcomeScreenSingleFileOpeningCollector.logNotificationShown(it) } return Function { fileEditor -> createNotificationPanel(project, file, fileEditor, projectRootInfo) } } @@ -151,7 +147,7 @@ abstract class WelcomeScreenOpenFileNotificationProvider : EditorNotificationPro } panel.createActionLabel(buttonLabelText) { - projectRootInfo.result.asOpeningStrategy { logNotificationOpenButtonClicked(it) } + projectRootInfo.result.asOpeningStrategy { WelcomeScreenSingleFileOpeningCollector.logNotificationOpenButtonClicked(it) } service().addFileToCloseOnProjectClose(file) WelcomeScreenAppScopeHolder.getInstance().coroutineScope.launch { @@ -166,7 +162,7 @@ abstract class WelcomeScreenOpenFileNotificationProvider : EditorNotificationPro } } panel.setCloseAction { - projectRootInfo.result.asOpeningStrategy { logNotificationClosed(it) } + projectRootInfo.result.asOpeningStrategy { WelcomeScreenSingleFileOpeningCollector.logNotificationClosed(it) } closedNotificationFiles.add(file.path) EditorNotifications.getInstance(project).updateNotifications(file) diff --git a/platform/non-modal-welcome-screen/src/com/intellij/platform/ide/nonModalWelcomeScreen/newProjectNotification/WelcomeScreenSingleFileOpeningCollector.kt b/platform/non-modal-welcome-screen/src/com/intellij/platform/ide/nonModalWelcomeScreen/newProjectNotification/WelcomeScreenSingleFileOpeningCollector.kt index f65dedd150b1..bd80429ee4d4 100644 --- a/platform/non-modal-welcome-screen/src/com/intellij/platform/ide/nonModalWelcomeScreen/newProjectNotification/WelcomeScreenSingleFileOpeningCollector.kt +++ b/platform/non-modal-welcome-screen/src/com/intellij/platform/ide/nonModalWelcomeScreen/newProjectNotification/WelcomeScreenSingleFileOpeningCollector.kt @@ -7,34 +7,19 @@ import com.intellij.internal.statistic.eventLog.events.EventFields import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesCollector internal object WelcomeScreenSingleFileOpeningCollector : CounterUsagesCollector() { - enum class OpeningStrategy { - FOLDER, - PROJECT, - } + FOLDER, + PROJECT, + } private val GROUP = EventLogGroup("welcome.screen.single.file.opening", 1) private val fieldOpeningStrategy: EnumEventField = EventFields.Enum("opening_strategy", OpeningStrategy::class.java) - private val NOTIFICATION_SUPPRESSED = GROUP.registerEvent( - "notification.suppressed", - ) - - private val NOTIFICATION_SHOWN = GROUP.registerEvent( - "notification.shown", - fieldOpeningStrategy - ) - - private val NOTIFICATION_CLOSED = GROUP.registerEvent( - "notification.closed", - fieldOpeningStrategy - ) - - private val NOTIFICATION_CLICKED = GROUP.registerEvent( - "notification.clicked", - fieldOpeningStrategy - ) + private val NOTIFICATION_SUPPRESSED = GROUP.registerEvent("notification.suppressed") + private val NOTIFICATION_SHOWN = GROUP.registerEvent("notification.shown", fieldOpeningStrategy) + private val NOTIFICATION_CLOSED = GROUP.registerEvent("notification.closed", fieldOpeningStrategy) + private val NOTIFICATION_CLICKED = GROUP.registerEvent("notification.clicked", fieldOpeningStrategy) override fun getGroup(): EventLogGroup = GROUP @@ -45,4 +30,4 @@ internal object WelcomeScreenSingleFileOpeningCollector : CounterUsagesCollector fun logNotificationClosed(openingStrategy: OpeningStrategy): Unit = NOTIFICATION_CLOSED.log(openingStrategy) fun logNotificationOpenButtonClicked(openingStrategy: OpeningStrategy): Unit = NOTIFICATION_CLICKED.log(openingStrategy) -} \ No newline at end of file +} diff --git a/platform/platform-impl/src/com/intellij/diagnostic/FusFreezeReporter.kt b/platform/platform-impl/src/com/intellij/diagnostic/FusFreezeReporter.kt index 40d0ec8934ad..f9d754406608 100644 --- a/platform/platform-impl/src/com/intellij/diagnostic/FusFreezeReporter.kt +++ b/platform/platform-impl/src/com/intellij/diagnostic/FusFreezeReporter.kt @@ -27,11 +27,11 @@ internal class FusFreezeReporter : PerformanceListener { val elapsedMs = TimeUnit.NANOSECONDS.toMillis(currentTime - previousLoggedUiResponse) if (elapsedMs >= UI_RESPONSE_LOGGING_INTERVAL_MS) { previousLoggedUiResponse = currentTime - UILatencyLogger.LATENCY.log(latencyMs) + UILatencyLogger.logLatency(latencyMs) } if (latencyMs >= TOLERABLE_UI_LATENCY && !isDebugEnabled) { val hasIndexingGoingOn = ProjectManager.getInstance().openProjects.any { DumbService.isDumb(it) } - UILatencyLogger.LAGGING.log(latencyMs, hasIndexingGoingOn) + UILatencyLogger.logLagging(latencyMs, hasIndexingGoingOn) } } } diff --git a/platform/platform-impl/src/com/intellij/diagnostic/IdeHeartbeatEventReporter.kt b/platform/platform-impl/src/com/intellij/diagnostic/IdeHeartbeatEventReporter.kt index 98fcaf55cd02..5d2bf9ed049c 100644 --- a/platform/platform-impl/src/com/intellij/diagnostic/IdeHeartbeatEventReporter.kt +++ b/platform/platform-impl/src/com/intellij/diagnostic/IdeHeartbeatEventReporter.kt @@ -7,22 +7,13 @@ import com.intellij.ide.PowerSaveMode import com.intellij.idea.IdeaLogger import com.intellij.internal.statistic.collectors.fus.actions.persistence.ActionsEventLogGroup import com.intellij.internal.statistic.eventLog.EventLogGroup -import com.intellij.internal.statistic.eventLog.events.BooleanEventField -import com.intellij.internal.statistic.eventLog.events.EnumEventField import com.intellij.internal.statistic.eventLog.events.EventFields -import com.intellij.internal.statistic.eventLog.events.EventFields.Boolean -import com.intellij.internal.statistic.eventLog.events.EventFields.Enum -import com.intellij.internal.statistic.eventLog.events.EventFields.Int -import com.intellij.internal.statistic.eventLog.events.EventFields.StringListValidatedByInlineRegexp -import com.intellij.internal.statistic.eventLog.events.EventId1 -import com.intellij.internal.statistic.eventLog.events.EventId2 import com.intellij.internal.statistic.eventLog.events.EventPair import com.intellij.internal.statistic.eventLog.events.FloatEventField import com.intellij.internal.statistic.eventLog.events.FusHistogramBuilder import com.intellij.internal.statistic.eventLog.events.IntEventField -import com.intellij.internal.statistic.eventLog.events.LongEventField -import com.intellij.internal.statistic.eventLog.events.VarargEventId import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesCollector +import com.intellij.lang.Language import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.components.Service import com.intellij.openapi.components.serviceAsync @@ -125,19 +116,9 @@ private class IdeHeartbeatEventReporterService(cs: CoroutineScope) { } ?: -1 // don't report total GC time in the first 5 minutes of IJ execution - UILatencyLogger.HEARTBEAT.log( - UILatencyLogger.SYSTEM_CPU_LOAD.with(cpuLoadInPercents), - UILatencyLogger.SWAP_LOAD.with(swapLoadInPercents), - UILatencyLogger.CPU_TIME.with(cpuTimeInPeriodMs), - - UILatencyLogger.GC_TIME.with(gcDurationInPeriodMs.toInt()), - - UILatencyLogger.TIME_TO_SAFEPOINT.with(timeToSafepointMs), - UILatencyLogger.TIME_AT_SAFEPOINT.with(timeAtSafepointMs), - UILatencyLogger.SAFEPOINTS_COUNT.with(safepointsCount), - - UILatencyLogger.POWER_SOURCE.with(PowerStatus.getPowerStatus()), - UILatencyLogger.POWER_SAVE_MODE.with(PowerSaveMode.isEnabled()) + UILatencyLogger.reportHeartbeat( + cpuLoadInPercents, swapLoadInPercents, cpuTimeInPeriodMs, gcDurationInPeriodMs, + timeToSafepointMs, timeAtSafepointMs, safepointsCount ) delay(100.seconds) @@ -148,85 +129,107 @@ private class IdeHeartbeatEventReporterService(cs: CoroutineScope) { internal object UILatencyLogger : CounterUsagesCollector() { private val GROUP = EventLogGroup("performance", 81) - internal val SYSTEM_CPU_LOAD: IntEventField = Int("system_cpu_load") - internal val SWAP_LOAD: IntEventField = Int("swap_load") - internal val CPU_TIME: IntEventField = Int("cpu_time_ms") - internal val GC_TIME: IntEventField = Int("gc_time_ms") + private val SYSTEM_CPU_LOAD = EventFields.Int("system_cpu_load") + private val SWAP_LOAD = EventFields.Int("swap_load") + private val CPU_TIME = EventFields.Int("cpu_time_ms") + private val GC_TIME = EventFields.Int("gc_time_ms") - internal val TIME_TO_SAFEPOINT: IntEventField = Int("time_to_safepoint_ms") - internal val TIME_AT_SAFEPOINT: IntEventField = Int("time_at_safepoint_ms") - internal val SAFEPOINTS_COUNT: IntEventField = Int("safepoints_count") + private val TIME_TO_SAFEPOINT = EventFields.Int("time_to_safepoint_ms") + private val TIME_AT_SAFEPOINT = EventFields.Int("time_at_safepoint_ms") + private val SAFEPOINTS_COUNT = EventFields.Int("safepoints_count") - internal val POWER_SOURCE: EnumEventField = Enum("power_source") - internal val POWER_SAVE_MODE: BooleanEventField = Boolean("power_save_mode") - internal val HEARTBEAT: VarargEventId = GROUP.registerVarargEvent( + private val POWER_SOURCE = EventFields.Enum("power_source") + private val POWER_SAVE_MODE = EventFields.Boolean("power_save_mode") + private val HEARTBEAT = GROUP.registerVarargEvent( "heartbeat", - SYSTEM_CPU_LOAD, - SWAP_LOAD, - CPU_TIME, - - GC_TIME, - TIME_TO_SAFEPOINT, - TIME_AT_SAFEPOINT, - SAFEPOINTS_COUNT, - - POWER_SOURCE, - POWER_SAVE_MODE + SYSTEM_CPU_LOAD, SWAP_LOAD, CPU_TIME, GC_TIME, TIME_TO_SAFEPOINT, TIME_AT_SAFEPOINT, SAFEPOINTS_COUNT, + POWER_SOURCE, POWER_SAVE_MODE ) - @JvmField - val LATENCY: EventId1 = GROUP.registerEvent("ui.latency", EventFields.DurationMs) + fun reportHeartbeat( + cpuLoadInPercents: Int, + swapLoadInPercents: Int, + cpuTimeInPeriodMs: Int, + gcDurationInPeriodMs: Long, + timeToSafepointMs: Int, + timeAtSafepointMs: Int, + safepointsCount: Int, + ) { + HEARTBEAT.log( + SYSTEM_CPU_LOAD.with(cpuLoadInPercents), + SWAP_LOAD.with(swapLoadInPercents), + CPU_TIME.with(cpuTimeInPeriodMs), - @JvmField - val LAGGING: EventId2 = GROUP.registerEvent("ui.lagging", EventFields.DurationMs, Boolean("during_indexing")) + GC_TIME.with(gcDurationInPeriodMs.toInt()), - @JvmField - val COLD_START: BooleanEventField = Boolean("cold_start") + TIME_TO_SAFEPOINT.with(timeToSafepointMs), + TIME_AT_SAFEPOINT.with(timeAtSafepointMs), + SAFEPOINTS_COUNT.with(safepointsCount), - @JvmField - val ACTION_POPUP_LATENCY: VarargEventId = GROUP.registerVarargEvent("popup.latency", - EventFields.DurationMs, - EventFields.ActionPlace, - COLD_START, - EventFields.Language) + POWER_SOURCE.with(PowerStatus.getPowerStatus()), + POWER_SAVE_MODE.with(PowerSaveMode.isEnabled()) + ) + } - @JvmField - val MAIN_MENU_LATENCY: EventId1 = GROUP.registerEvent("mainmenu.latency", EventFields.DurationMs) + private val LATENCY = GROUP.registerEvent("ui.latency", EventFields.DurationMs) + private val LAGGING = GROUP.registerEvent("ui.lagging", EventFields.DurationMs, EventFields.Boolean("during_indexing")) + private val COLD_START = EventFields.Boolean("cold_start") + private val ACTION_POPUP_LATENCY = GROUP.registerVarargEvent( + "popup.latency", + EventFields.DurationMs, EventFields.ActionPlace, COLD_START, EventFields.Language + ) + private val MAIN_MENU_LATENCY = GROUP.registerEvent("mainmenu.latency", EventFields.DurationMs) - private val MEMORY_TYPE_FIELD = Enum("type", MemoryKind::class.java) - private val HEAP_SIZE_FIELD = Int("heap_size_gigabytes") - private val PROJECT_COUNT_FIELD = Int("project_count") - private val IS_OOM_HAPPENED_FIELD = Boolean("oom_error") - private val IS_FROM_CRASH_FIELD = Boolean("oom_crash") + fun logLatency(latencyMs: Long) { + LATENCY.log(latencyMs) + } + + fun logLagging(latencyMs: Long, hasIndexingGoingOn: Boolean) { + LAGGING.log(latencyMs, hasIndexingGoingOn) + } + + @JvmStatic + fun logActionPopupLatency(time: Long, place: String, coldStart: Boolean, language: Language?) { + ACTION_POPUP_LATENCY.log( + EventFields.DurationMs.with(time), + EventFields.ActionPlace.with(place), + COLD_START.with(coldStart), + EventFields.Language.with(language) + ) + } + + fun logMainMenuLatency(startMs: Long) { + MAIN_MENU_LATENCY.log(System.currentTimeMillis() - startMs) + } + + private val MEMORY_TYPE_FIELD = EventFields.Enum("type") + private val HEAP_SIZE_FIELD = EventFields.Int("heap_size_gigabytes") + private val PROJECT_COUNT_FIELD = EventFields.Int("project_count") + private val IS_OOM_HAPPENED_FIELD = EventFields.Boolean("oom_error") + private val IS_FROM_CRASH_FIELD = EventFields.Boolean("oom_crash") private val LAST_ACTION_FIELD = ActionsEventLogGroup.ActionIdField("last_action_id") - - @JvmField - val LOW_MEMORY_CONDITION: VarargEventId = GROUP.registerVarargEvent("low.memory", - MEMORY_TYPE_FIELD, - HEAP_SIZE_FIELD, - PROJECT_COUNT_FIELD, - IS_OOM_HAPPENED_FIELD, - IS_FROM_CRASH_FIELD, - LAST_ACTION_FIELD, - EventFields.Dumb) + private val LOW_MEMORY_CONDITION = GROUP.registerVarargEvent( + "low.memory", + MEMORY_TYPE_FIELD, HEAP_SIZE_FIELD, PROJECT_COUNT_FIELD, IS_OOM_HAPPENED_FIELD, IS_FROM_CRASH_FIELD, LAST_ACTION_FIELD, EventFields.Dumb + ) // ==== JVMResponsivenessMonitor: overall system run-time-variability sampling /** number of samples in this set of measurements */ - private val SAMPLES_COUNT: IntEventField = IntEventField("samples") + private val SAMPLES_COUNT = EventFields.Int("samples") /** mean task running time, in nanoseconds */ - private val AVG_NS: FloatEventField = FloatEventField("avg_ns") + private val AVG_NS = EventFields.Float("avg_ns") /** 50%-tile of task running time, in nanoseconds */ - private val P50_NS: LongEventField = LongEventField("p50_ns") + private val P50_NS = EventFields.Long("p50_ns") //below fields values are _relative to median_: 99%/50%, 99.9%/50%, max/50% - private val P99_TO_P50: FloatEventField = FloatEventField("p99_to_p50") - private val P999_TO_P50: FloatEventField = FloatEventField("p999_to_p50") - private val MAX_TO_P50: FloatEventField = FloatEventField("max_to_p50") + private val P99_TO_P50 = EventFields.Float("p99_to_p50") + private val P999_TO_P50 = EventFields.Float("p999_to_p50") + private val MAX_TO_P50 = EventFields.Float("max_to_p50") - private val RESPONSIVENESS_EVENT: VarargEventId = GROUP.registerVarargEvent( + private val RESPONSIVENESS_EVENT = GROUP.registerVarargEvent( "responsiveness", AVG_NS, P50_NS, P99_TO_P50, P999_TO_P50, MAX_TO_P50, @@ -235,86 +238,61 @@ internal object UILatencyLogger : CounterUsagesCollector() { // ==== Detailed UI Thread statistics: information about latency and throughput of UI Event Queue - val UI_EVENTS_COUNT: IntEventField = Int("ui_execution_events_count", description = "Total number of UI events executed by the AWT EventQueue.") + private val UI_EVENTS_COUNT = EventFields.Int("ui_execution_events_count", "Total number of UI events executed by the AWT EventQueue.") - val WINDOW_LENGTH_MS: IntEventField = Int("window_length_ms", description = "The duration of measurement window in milliseconds.") + private val WINDOW_LENGTH_MS = EventFields.Int("window_length_ms", "The duration of measurement window in milliseconds.") - val UI_EXECUTION_TIME_TOTAL_MS: IntEventField = Int("ui_execution_total_ms", description = "Total time spent on executing UI events in milliseconds.") - val UI_EXECUTION_TIME_50_US: IntEventField = Int("ui_execution_p50_us", description = "Median duration of execution of a UI event in microseconds.") - val UI_EXECUTION_TIME_95_TO_50: FloatEventField = FloatEventField("ui_execution_p95_to_p50", description = "Relation of 95-th percentile of a UI event execution to the median") - val UI_EXECUTION_TIME_99_TO_50: FloatEventField = FloatEventField("ui_execution_p99_to_p50", description = "Relation of 99-th percentile of a UI event execution to the median") + private val UI_EXECUTION_TIME_TOTAL_MS = EventFields.Int("ui_execution_total_ms", "Total time spent on executing UI events in milliseconds.") + private val UI_EXECUTION_TIME_50_US = EventFields.Int("ui_execution_p50_us", "Median duration of execution of a UI event in microseconds.") + private val UI_EXECUTION_TIME_95_TO_50 = EventFields.Float("ui_execution_p95_to_p50", "Relation of 95-th percentile of a UI event execution to the median") + private val UI_EXECUTION_TIME_99_TO_50 = EventFields.Float("ui_execution_p99_to_p50", "Relation of 99-th percentile of a UI event execution to the median") - val INVOCATION_EVENTS_COUNT: IntEventField = Int("invocation_events_count", description = "Number of executed invocation events. Events skipped because of modality mismatch are not counted.") + private val INVOCATION_EVENTS_COUNT = EventFields.Int("invocation_events_count", "Number of executed invocation events. Events skipped because of modality mismatch are not counted.") - val INVOCATION_WAITING_TIME_TOTAL_MS: IntEventField = Int("invocation_waiting_total_ms", description = "Sum over times of each invocation event spending in the event queue in milliseconds.") - val INVOCATION_WAITING_TIME_50_US: IntEventField = Int("invocation_waiting_p50_us", description = "Median waiting time of an invocation event in microseconds.") - val INVOCATION_WAITING_TIME_95_TO_50: FloatEventField = FloatEventField("invocation_waiting_p95_to_p50", description = "Relation of 95-th percentile of an invocation event waiting to the median") - val INVOCATION_WAITING_TIME_99_TO_50: FloatEventField = FloatEventField("invocation_waiting_p99_to_p50", description = "Relation of 99-th percentile of an invocation event waiting to the median") + private val INVOCATION_WAITING_TIME_TOTAL_MS = EventFields.Int("invocation_waiting_total_ms", "Sum over times of each invocation event spending in the event queue in milliseconds.") + private val INVOCATION_WAITING_TIME_50_US = EventFields.Int("invocation_waiting_p50_us", "Median waiting time of an invocation event in microseconds.") + private val INVOCATION_WAITING_TIME_95_TO_50 = EventFields.Float("invocation_waiting_p95_to_p50", "Relation of 95-th percentile of an invocation event waiting to the median") + private val INVOCATION_WAITING_TIME_99_TO_50 = EventFields.Float("invocation_waiting_p99_to_p50", "Relation of 99-th percentile of an invocation event waiting to the median") - val INVOCATION_EXECUTION_TIME_TOTAL_MS: IntEventField = Int("invocation_execution_total_ms", description = "Total time spent on executing invocation events in milliseconds.") - val INVOCATION_EXECUTION_TIME_50_US: IntEventField = Int("invocation_execution_p50_us", description = "Median execution time of an invocation events in microseconds.") - val INVOCATION_EXECUTION_TIME_95_TO_50: FloatEventField = FloatEventField("invocation_execution_p95_to_p50", description = "Relation of 95-th percentile of an invocation event execution to the median") - val INVOCATION_EXECUTION_TIME_99_TO_50: FloatEventField = FloatEventField("invocation_execution_p99_to_p50", description = "Relation of 99-th percentile of an invocation event execution to the median") + private val INVOCATION_EXECUTION_TIME_TOTAL_MS = EventFields.Int("invocation_execution_total_ms", "Total time spent on executing invocation events in milliseconds.") + private val INVOCATION_EXECUTION_TIME_50_US = EventFields.Int("invocation_execution_p50_us", "Median execution time of an invocation events in microseconds.") + private val INVOCATION_EXECUTION_TIME_95_TO_50 = EventFields.Float("invocation_execution_p95_to_p50", "Relation of 95-th percentile of an invocation event execution to the median") + private val INVOCATION_EXECUTION_TIME_99_TO_50 = EventFields.Float("invocation_execution_p99_to_p50", "Relation of 99-th percentile of an invocation event execution to the median") - val WRITE_LOCK_EVENTS: IntEventField = Int("write_lock_events_count", description = "Number of requests for write lock") + private val WRITE_LOCK_EVENTS = EventFields.Int("write_lock_events_count", "Number of requests for write lock") - val WRITE_LOCK_WAITING_TIME_TOTAL_MS: IntEventField = Int("write_lock_waiting_ms", description = "Total time spent on waiting for acquisition of the write lock in milliseconds.") - val WRITE_LOCK_WAITING_TIME_50_US: IntEventField = Int("write_lock_waiting_p50_us", description = "Median waiting time for the write lock in microseconds.") - val WRITE_LOCK_WAITING_TIME_95_TO_50: FloatEventField = FloatEventField("write_lock_waiting_p95_to_p50", description = "Relation of 95-th percentile of a write lock acquisition to the median") - val WRITE_LOCK_WAITING_TIME_99_TO_50: FloatEventField = FloatEventField("write_lock_waiting_p99_to_p50", description = "Relation of 99-th percentile of a write lock acquisition to the median") + private val WRITE_LOCK_WAITING_TIME_TOTAL_MS = EventFields.Int("write_lock_waiting_ms", "Total time spent on waiting for acquisition of the write lock in milliseconds.") + private val WRITE_LOCK_WAITING_TIME_50_US = EventFields.Int("write_lock_waiting_p50_us", "Median waiting time for the write lock in microseconds.") + private val WRITE_LOCK_WAITING_TIME_95_TO_50 = EventFields.Float("write_lock_waiting_p95_to_p50", "Relation of 95-th percentile of a write lock acquisition to the median") + private val WRITE_LOCK_WAITING_TIME_99_TO_50 = EventFields.Float("write_lock_waiting_p99_to_p50", "Relation of 99-th percentile of a write lock acquisition to the median") - val WRITE_LOCK_EXECUTION_TIME_TOTAL_MS: IntEventField = Int("write_lock_execution_ms", description = "Total time spent on execution of write actions in milliseconds.") - val WRITE_LOCK_EXECUTION_TIME_50_US: IntEventField = Int("write_lock_execution_p50_us", description = "Median execution time of write actions in microseconds.") - val WRITE_LOCK_EXECUTION_TIME_95_TO_50: FloatEventField = FloatEventField("write_lock_execution_p95_to_p50", description = "Relation of 95-th percentile of a write action execution time to the median") - val WRITE_LOCK_EXECUTION_TIME_99_TO_50: FloatEventField = FloatEventField("write_lock_execution_p99_to_p50", description = "Relation of 99-th percentile of a write action execution time to the median") + private val WRITE_LOCK_EXECUTION_TIME_TOTAL_MS = EventFields.Int("write_lock_execution_ms", "Total time spent on execution of write actions in milliseconds.") + private val WRITE_LOCK_EXECUTION_TIME_50_US = EventFields.Int("write_lock_execution_p50_us", "Median execution time of write actions in microseconds.") + private val WRITE_LOCK_EXECUTION_TIME_95_TO_50 = EventFields.Float("write_lock_execution_p95_to_p50", "Relation of 95-th percentile of a write action execution time to the median") + private val WRITE_LOCK_EXECUTION_TIME_99_TO_50 = EventFields.Float("write_lock_execution_p99_to_p50", "Relation of 99-th percentile of a write action execution time to the median") - val READING_LOCK_EVENTS: IntEventField = Int("reading_lock_events_count", description = "Number of events for read and write-intent locks") + private val READING_LOCK_EVENTS = EventFields.Int("reading_lock_events_count", "Number of events for read and write-intent locks") - val READING_LOCK_WAITING_TIME_TOTAL_MS: IntEventField = Int("reading_lock_waiting_ms", description = "Total time spent on waiting for read and write-intent locks in milliseconds.") - val READING_LOCK_WAITING_TIME_50_US: IntEventField = Int("reading_lock_waiting_p50_us", description = "Median waiting time for the read and write-intent locks in microseconds.") - val READING_LOCK_WAITING_TIME_95_TO_50: FloatEventField = FloatEventField("reading_lock_waiting_p95_to_p50", description = "Relation of 95-th percentile of read and write-intent locks waiting to the median") - val READING_LOCK_WAITING_TIME_99_TO_50: FloatEventField = FloatEventField("reading_lock_waiting_p99_to_p50", description = "Relation of 99-th percentile of read and write-intent locks waiting to the median") + private val READING_LOCK_WAITING_TIME_TOTAL_MS = EventFields.Int("reading_lock_waiting_ms", "Total time spent on waiting for read and write-intent locks in milliseconds.") + private val READING_LOCK_WAITING_TIME_50_US = EventFields.Int("reading_lock_waiting_p50_us", "Median waiting time for the read and write-intent locks in microseconds.") + private val READING_LOCK_WAITING_TIME_95_TO_50 = EventFields.Float("reading_lock_waiting_p95_to_p50", "Relation of 95-th percentile of read and write-intent locks waiting to the median") + private val READING_LOCK_WAITING_TIME_99_TO_50 = EventFields.Float("reading_lock_waiting_p99_to_p50", "Relation of 99-th percentile of read and write-intent locks waiting to the median") - val READING_LOCK_EXECUTION_TIME_TOTAL_MS: IntEventField = Int("reading_lock_execution_ms", description = "Total time spent on execution of read and write-intent actions in milliseconds.") - val READING_LOCK_EXECUTION_TIME_50_US: IntEventField = Int("reading_lock_execution_p50_us", description = "Median execution time of read and write-intent actions in microseconds.") - val READING_LOCK_EXECUTION_TIME_95_TO_50: FloatEventField = FloatEventField("reading_lock_execution_p95_to_p50", description = "Relation of 95-th percentile of read and write-intent actions execution time to the median") - val READING_LOCK_EXECUTION_TIME_99_TO_50: FloatEventField = FloatEventField("reading_lock_execution_p99_to_p50", description = "Relation of 99-th percentile of read and write-intent actions execution time to the median") + private val READING_LOCK_EXECUTION_TIME_TOTAL_MS = EventFields.Int("reading_lock_execution_ms", "Total time spent on execution of read and write-intent actions in milliseconds.") + private val READING_LOCK_EXECUTION_TIME_50_US = EventFields.Int("reading_lock_execution_p50_us", "Median execution time of read and write-intent actions in microseconds.") + private val READING_LOCK_EXECUTION_TIME_95_TO_50 = EventFields.Float("reading_lock_execution_p95_to_p50", "Relation of 95-th percentile of read and write-intent actions execution time to the median") + private val READING_LOCK_EXECUTION_TIME_99_TO_50 = EventFields.Float("reading_lock_execution_p99_to_p50", "Relation of 99-th percentile of read and write-intent actions execution time to the median") - private val UI_RESPONSIVENESS: VarargEventId = GROUP.registerVarargEvent( - eventId = "ui.responsiveness", - UI_EVENTS_COUNT, - WINDOW_LENGTH_MS, - UI_EXECUTION_TIME_TOTAL_MS, - UI_EXECUTION_TIME_50_US, - UI_EXECUTION_TIME_95_TO_50, - UI_EXECUTION_TIME_99_TO_50, - INVOCATION_EVENTS_COUNT, - INVOCATION_WAITING_TIME_TOTAL_MS, - INVOCATION_WAITING_TIME_50_US, - INVOCATION_WAITING_TIME_95_TO_50, - INVOCATION_WAITING_TIME_99_TO_50, - INVOCATION_EXECUTION_TIME_TOTAL_MS, - INVOCATION_EXECUTION_TIME_50_US, - INVOCATION_EXECUTION_TIME_95_TO_50, - INVOCATION_EXECUTION_TIME_99_TO_50, - WRITE_LOCK_EVENTS, - WRITE_LOCK_WAITING_TIME_TOTAL_MS, - WRITE_LOCK_WAITING_TIME_50_US, - WRITE_LOCK_WAITING_TIME_95_TO_50, - WRITE_LOCK_WAITING_TIME_99_TO_50, - WRITE_LOCK_EXECUTION_TIME_TOTAL_MS, - WRITE_LOCK_EXECUTION_TIME_50_US, - WRITE_LOCK_EXECUTION_TIME_95_TO_50, - WRITE_LOCK_EXECUTION_TIME_99_TO_50, - READING_LOCK_EVENTS, - READING_LOCK_WAITING_TIME_TOTAL_MS, - READING_LOCK_WAITING_TIME_50_US, - READING_LOCK_WAITING_TIME_95_TO_50, - READING_LOCK_WAITING_TIME_99_TO_50, - READING_LOCK_EXECUTION_TIME_TOTAL_MS, - READING_LOCK_EXECUTION_TIME_50_US, - READING_LOCK_EXECUTION_TIME_95_TO_50, - READING_LOCK_EXECUTION_TIME_99_TO_50, + private val UI_RESPONSIVENESS = GROUP.registerVarargEvent( + "ui.responsiveness", + UI_EVENTS_COUNT, WINDOW_LENGTH_MS, UI_EXECUTION_TIME_TOTAL_MS, UI_EXECUTION_TIME_50_US, UI_EXECUTION_TIME_95_TO_50, + UI_EXECUTION_TIME_99_TO_50, INVOCATION_EVENTS_COUNT, INVOCATION_WAITING_TIME_TOTAL_MS, INVOCATION_WAITING_TIME_50_US, + INVOCATION_WAITING_TIME_95_TO_50, INVOCATION_WAITING_TIME_99_TO_50, INVOCATION_EXECUTION_TIME_TOTAL_MS, INVOCATION_EXECUTION_TIME_50_US, + INVOCATION_EXECUTION_TIME_95_TO_50, INVOCATION_EXECUTION_TIME_99_TO_50, WRITE_LOCK_EVENTS, WRITE_LOCK_WAITING_TIME_TOTAL_MS, + WRITE_LOCK_WAITING_TIME_50_US, WRITE_LOCK_WAITING_TIME_95_TO_50, WRITE_LOCK_WAITING_TIME_99_TO_50, WRITE_LOCK_EXECUTION_TIME_TOTAL_MS, + WRITE_LOCK_EXECUTION_TIME_50_US, WRITE_LOCK_EXECUTION_TIME_95_TO_50, WRITE_LOCK_EXECUTION_TIME_99_TO_50, READING_LOCK_EVENTS, + READING_LOCK_WAITING_TIME_TOTAL_MS, READING_LOCK_WAITING_TIME_50_US, READING_LOCK_WAITING_TIME_95_TO_50, READING_LOCK_WAITING_TIME_99_TO_50, + READING_LOCK_EXECUTION_TIME_TOTAL_MS, READING_LOCK_EXECUTION_TIME_50_US, READING_LOCK_EXECUTION_TIME_95_TO_50, READING_LOCK_EXECUTION_TIME_99_TO_50 ) fun reportUiResponsiveness( @@ -382,7 +360,7 @@ internal object UILatencyLogger : CounterUsagesCollector() { 16*1024, ) private val MEM_XMX_FIELD = EventFields.BoundedInt("xmx", intArrayOf(512, 768, 1024, 1536, 2048, 4096, 6000, 8192, 12288, 16384)) - private val MEM_SAMPLES_FIELD = IntEventField("samples") + private val MEM_SAMPLES_FIELD = EventFields.Int("samples") private val MEM_HISTOGRAM_TOTAL1_FIELD = EventFields.IntList( "ram_minus_file_mappings", description = "OS-provided process memory usage `RAM - FileMappings`; sampled every second, aggregated into a histogram; " + @@ -395,15 +373,14 @@ internal object UILatencyLogger : CounterUsagesCollector() { ) private val MEM_HEARTBEAT_EVENT = GROUP.registerVarargEvent( "heartbeat.memory", - MEM_XMX_FIELD, - MEM_SAMPLES_FIELD, - MEM_HISTOGRAM_TOTAL1_FIELD, - MEM_HISTOGRAM_TOTAL2_FIELD, + MEM_XMX_FIELD, MEM_SAMPLES_FIELD, MEM_HISTOGRAM_TOTAL1_FIELD, MEM_HISTOGRAM_TOTAL2_FIELD ) @JvmField - internal val SLOW_OPERATIONS_ISSUES = GROUP.registerEvent("slow.operation.issues", - StringListValidatedByInlineRegexp("issue_id", "[A-Z]{2,7}-\\d{1,6}")) + internal val SLOW_OPERATIONS_ISSUES = GROUP.registerEvent( + "slow.operation.issues", + EventFields.StringListValidatedByInlineRegexp("issue_id", "[A-Z]{2,7}-\\d{1,6}") + ) override fun getGroup(): EventLogGroup = GROUP @@ -480,7 +457,6 @@ internal object UILatencyLogger : CounterUsagesCollector() { /** Converts accumulated value into diff-value */ internal class LongDiffer(var previousAccumulatedValue: Long = 0){ - /** @return diff between newAccumulatedValue and previous accumulated value, and updates the previous accumulated value */ fun toDiff(newAccumulatedValue: Long): Long { val diff = newAccumulatedValue - previousAccumulatedValue @@ -488,7 +464,5 @@ internal class LongDiffer(var previousAccumulatedValue: Long = 0){ return diff } - override fun toString(): String { - return "LongDiffer[accumulated: $previousAccumulatedValue]" - } + override fun toString(): String = "LongDiffer[accumulated: $previousAccumulatedValue]" } diff --git a/platform/platform-impl/src/com/intellij/ide/plugins/DynamicPluginsUsagesCollector.kt b/platform/platform-impl/src/com/intellij/ide/plugins/DynamicPluginsUsagesCollector.kt index a083b669f708..52c8f7a15fea 100644 --- a/platform/platform-impl/src/com/intellij/ide/plugins/DynamicPluginsUsagesCollector.kt +++ b/platform/platform-impl/src/com/intellij/ide/plugins/DynamicPluginsUsagesCollector.kt @@ -2,22 +2,16 @@ package com.intellij.ide.plugins import com.intellij.internal.statistic.eventLog.EventLogGroup -import com.intellij.internal.statistic.eventLog.events.BooleanEventField import com.intellij.internal.statistic.eventLog.events.EventFields -import com.intellij.internal.statistic.eventLog.events.LongEventField import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesCollector import org.jetbrains.annotations.ApiStatus.Internal import kotlin.time.Duration @Internal internal object DynamicPluginsUsagesCollector : CounterUsagesCollector() { - override fun getGroup(): EventLogGroup = GROUP - private val GROUP = EventLogGroup( - id = "plugins.dynamic", - version = 4, - ) + private val GROUP = EventLogGroup(id = "plugins.dynamic", version = 4) private val LOAD_SUCCESS_EVENT = GROUP.registerEvent( eventId = "load.success", @@ -36,9 +30,9 @@ internal object DynamicPluginsUsagesCollector : CounterUsagesCollector() { private val LOAD_PAID_PLUGINS_EVENT = GROUP.registerEvent( eventId = "load.paid", - eventField1 = LongEventField(name = "duration_s", description = "Paid plugins loading duration in whole seconds"), + eventField1 = EventFields.Long(name = "duration_s", description = "Paid plugins loading duration in whole seconds"), eventField2 = EventFields.Count, - eventField3 = BooleanEventField("restart_required"), + eventField3 = EventFields.Boolean("restart_required"), ) @Internal diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionMenu.kt b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionMenu.kt index 8c8f73cb3d04..7c737d59df0e 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionMenu.kt +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionMenu.kt @@ -365,7 +365,7 @@ class ActionMenu constructor( fillMenu() // NOTE: FUS for OSX system menu is implemented in MacNativeActionMenu } else { - UILatencyLogger.MAIN_MENU_LATENCY.log(System.currentTimeMillis() - startMs) + UILatencyLogger.logMainMenuLatency(System.currentTimeMillis() - startMs) } } } diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionPopupMenuImpl.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionPopupMenuImpl.java index 0d50020158cc..736a4fc64edf 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionPopupMenuImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionPopupMenuImpl.java @@ -7,7 +7,6 @@ import com.intellij.ide.HelpTooltip; import com.intellij.ide.IdeEventQueue; import com.intellij.internal.inspector.UiInspectorActionUtil; import com.intellij.internal.inspector.UiInspectorUtil; -import com.intellij.internal.statistic.eventLog.events.EventFields; import com.intellij.lang.Language; import com.intellij.openapi.actionSystem.ActionGroup; import com.intellij.openapi.actionSystem.ActionPlaces; @@ -159,10 +158,7 @@ final class ActionPopupMenuImpl implements ActionPopupMenu, ApplicationActivatio PsiFile psiFile = CommonDataKeys.PSI_FILE.getData(Utils.getCachedOnlyDataContext(myContext)); Language language = psiFile == null ? null : psiFile.getLanguage(); boolean coldStart = SEEN_ACTION_GROUPS.add(Objects.hash(myGroup, language)); - UILatencyLogger.ACTION_POPUP_LATENCY.log(EventFields.DurationMs.with(time), - EventFields.ActionPlace.with(myPlace), - UILatencyLogger.COLD_START.with(coldStart), - EventFields.Language.with(language)); + UILatencyLogger.logActionPopupLatency(time, myPlace, coldStart, language); } @Override diff --git a/platform/platform-impl/src/com/intellij/platform/ide/menu/MacNativeActionMenu.kt b/platform/platform-impl/src/com/intellij/platform/ide/menu/MacNativeActionMenu.kt index d3b67635e09a..f2b0143ee49f 100644 --- a/platform/platform-impl/src/com/intellij/platform/ide/menu/MacNativeActionMenu.kt +++ b/platform/platform-impl/src/com/intellij/platform/ide/menu/MacNativeActionMenu.kt @@ -56,7 +56,7 @@ internal fun createMacNativeActionMenu(context: DataContext?, logger().error(e) } finally { - UILatencyLogger.MAIN_MENU_LATENCY.log(System.currentTimeMillis() - menuPeer.openTimeMs); + UILatencyLogger.logMainMenuLatency(System.currentTimeMillis() - menuPeer.openTimeMs); } } menuPeer.listenPresentationChanges(presentation) diff --git a/platform/statistics/src/com/intellij/internal/statistic/eventLog/events/EventFields.kt b/platform/statistics/src/com/intellij/internal/statistic/eventLog/events/EventFields.kt index 32939bec5277..b364da940533 100644 --- a/platform/statistics/src/com/intellij/internal/statistic/eventLog/events/EventFields.kt +++ b/platform/statistics/src/com/intellij/internal/statistic/eventLog/events/EventFields.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.internal.statistic.eventLog.events import com.intellij.ide.plugins.IdeaPluginDescriptor @@ -364,6 +364,10 @@ object EventFields { @JvmOverloads fun IntList(@NonNls @EventFieldName name: String, @NonNls description: String? = null): IntListEventField = IntListEventField(name, description) + @JvmStatic + @JvmOverloads + fun FloatList(@EventFieldName name: String, description: String? = null): FloatListEventField = FloatListEventField(name) + @JvmStatic @JvmOverloads fun LanguagesList(@NonNls @EventFieldName name: String, @NonNls description: String? = null): PrimitiveEventField> = @@ -786,4 +790,4 @@ object EventFields { } } } -} \ No newline at end of file +}