Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(android):处理卡顿检测时,容易触发发现卡顿 但是收集不到 堆栈的bug #1151

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down