diff --git a/Android/dokit/src/main/java/com/didichuxing/doraemonkit/kit/blockmonitor/core/MonitorCore.java b/Android/dokit/src/main/java/com/didichuxing/doraemonkit/kit/blockmonitor/core/MonitorCore.java index 0e2b18a4e..a0a997ac3 100644 --- a/Android/dokit/src/main/java/com/didichuxing/doraemonkit/kit/blockmonitor/core/MonitorCore.java +++ b/Android/dokit/src/main/java/com/didichuxing/doraemonkit/kit/blockmonitor/core/MonitorCore.java @@ -14,8 +14,11 @@ class MonitorCore implements Printer { private static final String TAG = "MonitorCore"; /** * 卡顿阈值 + * 该值必须大于 StackSampler 中的 DEFAULT_SAMPLE_INTERVAL 采样间隔 + * 否则会出现 发现卡顿 但是采集不到堆栈的问题 + * */ - private static final int BLOCK_THRESHOLD_MILLIS = 200; + private static final int BLOCK_THRESHOLD_MILLIS = 250; private long mStartTime = 0; private long mStartThreadTime = 0; diff --git a/Android/dokit/src/main/java/com/didichuxing/doraemonkit/kit/blockmonitor/core/StackSampler.java b/Android/dokit/src/main/java/com/didichuxing/doraemonkit/kit/blockmonitor/core/StackSampler.java index 7fb0d212f..89558abfc 100644 --- a/Android/dokit/src/main/java/com/didichuxing/doraemonkit/kit/blockmonitor/core/StackSampler.java +++ b/Android/dokit/src/main/java/com/didichuxing/doraemonkit/kit/blockmonitor/core/StackSampler.java @@ -16,7 +16,7 @@ */ public class StackSampler { private static final String TAG = "StackSampler"; - private static final int DEFAULT_SAMPLE_INTERVAL = 300; + private static final int DEFAULT_SAMPLE_INTERVAL = 200; private static final int DEFAULT_MAX_ENTRY_COUNT = 100; private static final String SEPARATOR = "\r\n"; private static final SimpleDateFormat TIME_FORMATTER =