mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ensure dumps stopped even on recursive edt events
GitOrigin-RevId: 31cf07b0685ea5009822ed54a338fc95baa76048
This commit is contained in:
committed by
intellij-monorepo-bot
parent
63958e8b12
commit
6a06cd749a
@@ -225,6 +225,7 @@ public class PerformanceWatcher implements Disposable {
|
||||
private void edtFrozenPrecise(long start) {
|
||||
myFreezeStart = start;
|
||||
myPublisher.uiFreezeStarted();
|
||||
stopDumping();
|
||||
myDumpTask = myExecutor.scheduleWithFixedDelay(this::dumpThreads, 0, getDumpInterval(), TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
@@ -241,12 +242,16 @@ public class PerformanceWatcher implements Disposable {
|
||||
return new SimpleDateFormat("yyyyMMdd-HHmmss").format(new Date(timeMs));
|
||||
}
|
||||
|
||||
private void edtResponds(long currentMillis) {
|
||||
if (myFreezeStart != 0) {
|
||||
if (myDumpTask != null) {
|
||||
myDumpTask.cancel(false);
|
||||
}
|
||||
private void stopDumping() {
|
||||
if (myDumpTask != null) {
|
||||
myDumpTask.cancel(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void edtResponds(long currentMillis) {
|
||||
stopDumping();
|
||||
|
||||
if (myFreezeStart != 0) {
|
||||
int unresponsiveDuration = (int)(currentMillis - myFreezeStart) / 1000;
|
||||
File dir = new File(myLogDir, getFreezeFolderName(myFreezeStart));
|
||||
File reportDir = null;
|
||||
|
||||
Reference in New Issue
Block a user