From f083042841b863a8453a3cd710fa613532bdc70a Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 13 Jan 2012 15:29:25 +0100 Subject: [PATCH] dump threads after 5, not 25 seconds of unresponsiveness --- .../src/com/intellij/diagnostic/PerformanceWatcher.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/diagnostic/PerformanceWatcher.java b/platform/platform-impl/src/com/intellij/diagnostic/PerformanceWatcher.java index 717ddecbf122..b314853d2956 100644 --- a/platform/platform-impl/src/com/intellij/diagnostic/PerformanceWatcher.java +++ b/platform/platform-impl/src/com/intellij/diagnostic/PerformanceWatcher.java @@ -50,6 +50,9 @@ public class PerformanceWatcher implements ApplicationComponent { private File myCurHangLogDir; private List myStacktraceCommonPart; + /** + * If the product is unresponsive for UNRESPONSIVE_THRESHOLD seconds, dump threads every UNRESPONSIVE_INTERVAL seconds + */ private int UNRESPONSIVE_THRESHOLD = 5; private int UNRESPONSIVE_INTERVAL = 5; @@ -160,7 +163,7 @@ public class PerformanceWatcher implements ApplicationComponent { break; } if (mySwingThreadCounter != myLoopCounter) { - myUnresponsiveDuration++; + myUnresponsiveDuration += UNRESPONSIVE_INTERVAL; if (myUnresponsiveDuration == UNRESPONSIVE_THRESHOLD) { //System.out.println("EDT is not responding at " + myPrintDateFormat.format(new Date())); myCurHangLogDir = new File(myLogDir, myDateFormat.format(new Date()));