bug(android):处理卡顿检测时,容易触发发现卡顿 但是收集不到 堆栈的bug #1151
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
堆栈检测默认是300ms采集,如果小于这个间隔则会stop dump,从消息队列中移除。
卡顿检测默认阈值是200ms。
如果一个卡顿是250ms,例如可以把dokit demo中的 BlockMonitorFragment 中的 mockBlock 方法中的 sleep(2000) 改成sleep(250)
此时就会出现能检测到卡顿,isBlock返回true,但是因为只有250ms的卡顿,还不到300ms所以直接stopDump 导致无法收集到堆栈