From b059812e82639b592b923d3ddceb55806e5a72e2 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Thu, 21 Aug 2025 10:47:35 +0200 Subject: [PATCH] [test commands] perform warmup in rename tests - use find usages as warmup to avoid publishing fus statistics from rename refactoring during warmup stage - use average time for search - perform undo to ensure there is something to search for ^KTIJ-35267 fixed GitOrigin-RevId: 1cbd6d421aaddc80a6e924c57b537dec9e98dd6d --- .../performancePlugin/commands/StartInlineRenameCommand.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/StartInlineRenameCommand.kt b/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/StartInlineRenameCommand.kt index e12d54e90442..d0296242cf52 100644 --- a/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/StartInlineRenameCommand.kt +++ b/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/StartInlineRenameCommand.kt @@ -5,6 +5,7 @@ import com.intellij.codeInsight.TargetElementUtil import com.intellij.ide.DataManager import com.intellij.openapi.actionSystem.CommonDataKeys import com.intellij.openapi.application.ApplicationManager +import com.intellij.openapi.command.impl.UndoManagerImpl import com.intellij.openapi.ui.playback.PlaybackContext import com.intellij.openapi.ui.playback.commands.AbstractCommand import com.intellij.openapi.wm.IdeFocusManager @@ -30,6 +31,7 @@ class StartInlineRenameCommand(text: String, line: Int) : AbstractCommand(text, override fun _execute(context: PlaybackContext): Promise { val actionCallback = ActionCallbackProfilerStopper() val project = context.project + UndoManagerImpl.ourNeverAskUser = true ApplicationManager.getApplication().invokeAndWait(Context.current().wrap(Runnable { val focusedComponent = IdeFocusManager.findInstance().focusOwner val dataContext = DataManager.getInstance().getDataContext(focusedComponent)