Skip to content

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

Open
punkisnotdead3 wants to merge 2 commits intodidi:masterfrom
punkisnotdead3:fi_stack_sampler_bug
Open

bug(android):处理卡顿检测时,容易触发发现卡顿 但是收集不到 堆栈的bug#1151
punkisnotdead3 wants to merge 2 commits intodidi:masterfrom
punkisnotdead3:fi_stack_sampler_bug

Conversation

@punkisnotdead3
Copy link

堆栈检测默认是300ms采集,如果小于这个间隔则会stop dump,从消息队列中移除。
卡顿检测默认阈值是200ms。

如果一个卡顿是250ms,例如可以把dokit demo中的 BlockMonitorFragment 中的 mockBlock 方法中的 sleep(2000) 改成sleep(250)

此时就会出现能检测到卡顿,isBlock返回true,但是因为只有250ms的卡顿,还不到300ms所以直接stopDump 导致无法收集到堆栈

堆栈检测默认是300ms采集,如果小于这个间隔则会stop dump,从消息队列中移除。
卡顿检测默认阈值是200ms。

如果一个卡顿是250ms,例如可以把dokit demo中的 BlockMonitorFragment 中的 mockBlock 方法中的 sleep(2000) 改成sleep(250)

此时就会出现能检测到卡顿,isBlock返回true,但是因为只有250ms的卡顿,还不到300ms所以直接stopDump 导致无法收集到堆栈
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant