[6.3.0][卡顿检测] 代码逻辑优化
This commit is contained in:
@@ -2,8 +2,6 @@ package com.mogo.launcher.lancet.jank.spi;
|
||||
import android.app.Activity;
|
||||
import android.os.Looper;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.auto.service.AutoService;
|
||||
import com.knightboost.lancet.api.synchronized_lock.SynchronizedLockHooker;
|
||||
import com.mogo.core.lancetx.compiler.lib.generator.Type;
|
||||
@@ -117,8 +115,7 @@ public class HookInvokerImpl implements IHookInvoker {
|
||||
|
||||
private void handleCostTimeRecord(Type type, String extra, Object caller, String methodName, long cost, Object... args) {
|
||||
//日志打印阈值
|
||||
long logThreshold = 5;
|
||||
if (cost >= logThreshold) {
|
||||
if (cost >= 5) {
|
||||
StringBuilder builder = message.get();
|
||||
if (builder == null) {
|
||||
builder = new StringBuilder();
|
||||
@@ -142,7 +139,7 @@ public class HookInvokerImpl implements IHookInvoker {
|
||||
if (o == null) {
|
||||
continue;
|
||||
}
|
||||
builder.append(o)
|
||||
builder.append((o instanceof Class) ? ((Class) o).getName() : o.getClass().getName())
|
||||
.append(",");
|
||||
}
|
||||
} else {
|
||||
@@ -152,7 +149,7 @@ public class HookInvokerImpl implements IHookInvoker {
|
||||
if (o == null) {
|
||||
continue;
|
||||
}
|
||||
builder.append(o)
|
||||
builder.append((o instanceof Class) ? ((Class) o).getName() : o.getClass().getName())
|
||||
.append(",");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ ext {
|
||||
passport_secret : "com.zhidaoauto:sdk-java:1.0.6-SNAPSHOT",
|
||||
|
||||
// 主线程卡顿监测
|
||||
block_detector : "com.mogo.eagle.core.block:runtime:20.0.20",
|
||||
block_detector : "com.mogo.eagle.core.block:runtime:20.0.25",
|
||||
|
||||
//======================== google auto-service ===============
|
||||
google_auto_service : "com.google.auto.service:auto-service:1.0-rc7",
|
||||
|
||||
Reference in New Issue
Block a user