mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
[Gradle|Sync|FUS] cleanup: use EventDataCollector for the complex Gradle sync fus event
GitOrigin-RevId: 623f8b3211cbb440eb28dbfb63cb8cf69035b0ff
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c64fa428e7
commit
6a03680849
+13
-11
@@ -85,17 +85,19 @@ object ExternalSystemSyncActionsCollector : CounterUsagesCollector() {
|
||||
@JvmStatic
|
||||
fun logSyncFinished(project: Project?, activityId: Long, success: Boolean) {
|
||||
val nowTS = System.currentTimeMillis()
|
||||
|
||||
val (duration, parallelModelFetchEnabled) =
|
||||
idToStartTS[activityId]
|
||||
?.let { Pair(nowTS - it.timestamp, it.parallelModelFetchEnabled) }
|
||||
?: Pair(-1L, false)
|
||||
|
||||
syncFinishedEvent.log(project,
|
||||
activityIdField.with(activityId),
|
||||
DurationMs.with(duration),
|
||||
isParallelModelFetch.with(parallelModelFetchEnabled),
|
||||
isSyncSuccessful.with(success))
|
||||
syncFinishedEvent.log(project) {
|
||||
add(activityIdField with activityId)
|
||||
val syncDetails = idToStartTS[activityId]
|
||||
if (syncDetails != null) {
|
||||
add(DurationMs with nowTS - syncDetails.timestamp)
|
||||
add(isParallelModelFetch with syncDetails.parallelModelFetchEnabled)
|
||||
}
|
||||
else {
|
||||
add(DurationMs with -1)
|
||||
add(isParallelModelFetch with false)
|
||||
}
|
||||
add(isSyncSuccessful with success)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
||||
Reference in New Issue
Block a user