[external system api][fus][IDEA-334176] remove unnecessary meter field

GitOrigin-RevId: 043755622c94108d80e97f5a4910c0647b9d8208
This commit is contained in:
Alexander.Glukhov
2023-10-24 13:37:46 +02:00
committed by intellij-monorepo-bot
parent cdd332830d
commit fc3660ec27

View File

@@ -5,7 +5,6 @@ import com.intellij.internal.statistic.eventLog.EventLogGroup
import com.intellij.internal.statistic.eventLog.events.EventFields
import com.intellij.internal.statistic.eventLog.events.EventPair
import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesCollector
import com.intellij.internal.statistic.utils.StatisticsUtil
import com.intellij.lang.Language
import com.intellij.openapi.project.Project
@@ -17,10 +16,9 @@ object ExternalSystemSourceAttachCollector : CounterUsagesCollector() {
private val HANDLER_FIELD = EventFields.Class("handler")
private val SUCCESS_FIELD = EventFields.Boolean("success")
private val EXPONENTIAL_DURATION_MS = EventFields.Long("exp_duration_ms")
private val SOURCES_ATTACHED_EVENT = GROUP.registerVarargEvent("attached", HANDLER_FIELD, EventFields.Language, SUCCESS_FIELD,
EventFields.DurationMs, EXPONENTIAL_DURATION_MS)
EventFields.DurationMs)
@JvmStatic
fun onSourcesAttached(project: Project, handlerClass: Class<*>, language: Language, success: Boolean, durationMs: Long) {
@@ -28,8 +26,7 @@ object ExternalSystemSourceAttachCollector : CounterUsagesCollector() {
HANDLER_FIELD.with(handlerClass),
EventFields.Language.with(language),
SUCCESS_FIELD.with(success),
EventFields.DurationMs.with(durationMs),
EXPONENTIAL_DURATION_MS.with(StatisticsUtil.roundToPowerOfTwo(durationMs))
EventFields.DurationMs.with(durationMs)
)
SOURCES_ATTACHED_EVENT.log(project, events)
}