-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IDEA-289922 git: FUS - report git stash operations duration
GitOrigin-RevId: e3ed909dc13f0f0d0f4895fd54e0a9ff31c778b3
- Loading branch information
1 parent
b1deb1c
commit 43601aa
Showing
5 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. | ||
package git4idea | ||
|
||
import com.intellij.internal.statistic.eventLog.EventLogGroup | ||
import com.intellij.internal.statistic.eventLog.events.EventFields | ||
import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesCollector | ||
|
||
class GitStashUsageCollector : CounterUsagesCollector() { | ||
override fun getGroup(): EventLogGroup = GROUP | ||
|
||
companion object { | ||
private val GROUP: EventLogGroup = EventLogGroup("stash.interactions", 1) | ||
|
||
private val STASH_PUSH = GROUP.registerEvent("stash_push", | ||
EventFields.DurationMs) | ||
|
||
private val STASH_POP = GROUP.registerEvent("stash_pop", | ||
EventFields.DurationMs) | ||
|
||
@JvmStatic | ||
fun logStashPush(startMs: Long) { | ||
STASH_PUSH.log(System.currentTimeMillis() - startMs) | ||
} | ||
|
||
@JvmStatic | ||
fun logStashPop(startMs: Long) { | ||
STASH_POP.log(System.currentTimeMillis() - startMs) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters