Closed zhengzhong1 closed 1 year ago
问题描述: Trace Canary 中通过检测主线程MessageQueue中消息执行时长来确认当前进程是否发生ANR,前台超过2s,后台超过10s 即认为当前进程发生anr,想了解一下:这两个数值是如何测定的?
private static final long FOREGROUND_MSG_THRESHOLD = -2000; private static final long BACKGROUND_MSG_THRESHOLD = -10000;
private static final long FOREGROUND_MSG_THRESHOLD = -2000;
private static final long BACKGROUND_MSG_THRESHOLD = -10000;
只是经验值,在漏报和误报中取一个比较平衡的值
问题描述: Trace Canary 中通过检测主线程MessageQueue中消息执行时长来确认当前进程是否发生ANR,前台超过2s,后台超过10s 即认为当前进程发生anr,想了解一下:这两个数值是如何测定的?
private static final long FOREGROUND_MSG_THRESHOLD = -2000;
private static final long BACKGROUND_MSG_THRESHOLD = -10000;