stop debugger ui experiments

GitOrigin-RevId: ff8fe72c1ddc1425af35c38e7a199315f80b160a
This commit is contained in:
Egor Ushakov
2023-02-09 18:06:34 +01:00
committed by intellij-monorepo-bot
parent 84998f5055
commit b868c55448
4 changed files with 2 additions and 67 deletions

View File

@@ -565,10 +565,6 @@ debugger.new.tool.window.layout.dnd=false
debugger.new.tool.window.layout.dnd.restartRequired=true
debugger.new.tool.window.layout.dnd.description=Enable drag and drop of the debugger tabs in the new debugger UI
debugger.default.selected.view.key=Default
debugger.ui.experiment.enabled=true
debugger.ui.experiment.group=-1
debugger.ui.experiment.group.restartRequired=true
debugger.ui.experiment.group.description=Defines the experiment group number. Negative value will be ignored.
debugger.track.instrumentation=true
debugger.variablesView.rss=true
debugger.variablesView.rss.description=Enable node expanding in variables view speed search

View File

@@ -112,7 +112,6 @@
<statistics.counterUsagesCollector implementationClass="com.intellij.xdebugger.impl.XDebuggerActionsCollector"/>
<statistics.counterUsagesCollector implementationClass="com.intellij.xdebugger.impl.XDebuggerPerformanceCollector"/>
<statistics.counterUsagesCollector implementationClass="com.intellij.xdebugger.impl.ui.DebuggerUIExperimentCollector"/>
<applicationService serviceInterface="com.intellij.xdebugger.attach.XAttachRecentItemsMatcher"
serviceImplementation="com.intellij.xdebugger.impl.actions.DefaultAttachRecentItemsMatcher"/>

View File

@@ -1,55 +0,0 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.xdebugger.impl.ui
import com.intellij.execution.ui.UIExperiment
import com.intellij.internal.statistic.eventLog.EventLogConfiguration.Companion.getInstance
import com.intellij.internal.statistic.eventLog.EventLogGroup
import com.intellij.internal.statistic.eventLog.events.EventFields
import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesCollector
import com.intellij.internal.statistic.utils.StatisticsUploadAssistant
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.util.registry.Registry
import com.intellij.util.PlatformUtils
class DebuggerUIExperimentCollector : CounterUsagesCollector() {
override fun getGroup(): EventLogGroup = GROUP
companion object {
private const val NUMBER_OF_EXPERIMENT_GROUPS = 3
private val GROUP = EventLogGroup("debugger.ui.experiment", 1)
private val START = GROUP.registerEvent("start", EventFields.Int("group"))
private val STOP = GROUP.registerEvent("stop")
@JvmStatic
fun startExperiment(): Boolean {
var res = false
if (isEnabled()) {
val experimentGroup = getExperimentGroup()
START.log(experimentGroup)
res = experimentGroup == NUMBER_OF_EXPERIMENT_GROUPS - 1
}
UIExperiment.setNewDebuggerUIEnabled(res)
return res
}
@JvmStatic
fun stopExperiment() {
if (isEnabled()) {
STOP.log()
}
}
private fun getExperimentGroup(): Int {
val registryExperimentGroup = Registry.intValue("debugger.ui.experiment.group")
return if (registryExperimentGroup >= 0) registryExperimentGroup
else getInstance().bucket %
NUMBER_OF_EXPERIMENT_GROUPS
}
private fun isEnabled(): Boolean = ApplicationManager.getApplication().isEAP &&
PlatformUtils.isIntelliJ() &&
Registry.`is`("debugger.ui.experiment.enabled") &&
StatisticsUploadAssistant.isSendAllowed() &&
!ApplicationManager.getApplication().isInternal
}
}

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.xdebugger.impl.ui;
import com.intellij.debugger.ui.DebuggerContentInfo;
@@ -78,11 +78,7 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
tab = new XDebugSessionTab3(session, icon, environment);
}
else {
if (DebuggerUIExperimentCollector.startExperiment()) {
tab = new XDebugSessionTab3(session, icon, environment);
} else {
tab = new XDebugSessionTab(session, icon, environment, true);
}
tab = new XDebugSessionTab(session, icon, environment, true);
}
tab.init(session);
@@ -361,7 +357,6 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
public void detachFromSession() {
assert mySession != null;
DebuggerUIExperimentCollector.stopExperiment();
mySession = null;
}