Merge branch 'dev_robotaxi-d_231031_6.2.0' into 6.2.0_merge_master
# Conflicts: # core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
-keeppackage com/mogo/eagle/core/lancetx/generated/
|
||||
-keeppackage com/mogo/eagle/core/handler/
|
||||
-keeppackage com/mogo/launcher/lancet/jank/
|
||||
-keeppackage com.mogo.eagle.core.data.config.JunkConfig
|
||||
-keeppackage com/rousetime/android_startup/
|
||||
-keeppackage com/mogo/systrace/
|
||||
-keeppackage com/bytedance/boost_multidex/
|
||||
|
||||
@@ -2,16 +2,15 @@ package com.mogo.launcher.lancet.jank.spi;
|
||||
import android.app.Activity;
|
||||
import android.os.Looper;
|
||||
import android.os.SystemClock;
|
||||
import com.apm.insight.log.VLog;
|
||||
import com.google.auto.service.AutoService;
|
||||
import com.mogo.core.lancetx.compiler.lib.generator.Type;
|
||||
import com.mogo.core.lancetx.compiler.lib.hook.IHookInvoker;
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant;
|
||||
import com.mogo.eagle.core.function.api.devatools.block.IMoGoBlockProvider;
|
||||
import com.mogo.eagle.core.function.api.devatools.perf.IMoGoCpuUsageProvider;
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.main.ARouterUtils;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
import com.mogo.eagle.core.utilcode.util.VLogUtils;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
@@ -168,7 +167,10 @@ public class HookInvokerImpl implements IHookInvoker {
|
||||
builder.setLength(builder.length() - 1);
|
||||
}
|
||||
|
||||
VLog.w("HookHandler", "Junk Detected:" + builder);
|
||||
String s = builder.toString();
|
||||
|
||||
|
||||
VLogUtils.w("HookHandler", "Junk Detected:" + builder, 4096);
|
||||
// linkedLog(type, builder.toString());
|
||||
if (flag) {
|
||||
extra.setLength(0);
|
||||
|
||||
@@ -7,13 +7,12 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.app.UrlConfig
|
||||
import com.mogo.eagle.core.data.config.JunkConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.launcher.BuildConfig
|
||||
import com.mogo.launcher.R
|
||||
import com.mogo.test.crashreport.CrashReportConstants
|
||||
import com.shuyu.gsyvideoplayer.player.IjkPlayerManager
|
||||
import com.zhidaoauto.map.sdk.open.HDTypes
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi
|
||||
import com.zhidaoauto.map.sdk.open.MapParams
|
||||
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
|
||||
@@ -75,8 +74,8 @@ object ConfigStartUp {
|
||||
// 清扫车 是否能切换当前业务模式
|
||||
FunctionBuildConfig.sweeperCanSwitchMode = BuildConfig.SWEEPER_CAN_SWITCH_MODE
|
||||
|
||||
// 是否开启卡顿检测
|
||||
FunctionBuildConfig.isSupportJunkDetect = BuildConfig.IS_SUPPORT_JUNK_DETECT
|
||||
//是否开启卡顿检测
|
||||
JunkConfig.isSupportJunkDetect = BuildConfig.IS_SUPPORT_JUNK_DETECT
|
||||
}
|
||||
|
||||
private fun initDebugConfig() {
|
||||
|
||||
@@ -102,8 +102,6 @@ dependencies {
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:mogo-core-res')
|
||||
|
||||
compileOnly rootProject.ext.dependencies.apm_insight
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -4,7 +4,6 @@ import android.content.*
|
||||
import android.util.*
|
||||
import android.view.*
|
||||
import androidx.metrics.performance.*
|
||||
import com.apm.insight.log.VLog
|
||||
import com.mogo.eagle.core.block.runtime.*
|
||||
import com.mogo.eagle.core.block.runtime.config.*
|
||||
import com.mogo.eagle.core.block.runtime.config.recorder.*
|
||||
@@ -14,6 +13,7 @@ import com.mogo.eagle.core.block.runtime.report.*
|
||||
import com.mogo.eagle.core.function.api.devatools.block.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.VLogUtils
|
||||
import java.util.concurrent.TimeUnit.SECONDS
|
||||
|
||||
internal class MoGoBlockProviderImpl: IMoGoBlockProvider, IBlockListener {
|
||||
@@ -30,10 +30,10 @@ internal class MoGoBlockProviderImpl: IMoGoBlockProvider, IBlockListener {
|
||||
override fun init(ctx: Context) {
|
||||
BlockDetector.init(BlockMetrics.Builder()
|
||||
.context(ctx)
|
||||
.multiplier(2.0f)
|
||||
.multiplier(1.2f)
|
||||
.isDebug(false)
|
||||
.period(5, SECONDS)
|
||||
.junkRateThreshold(0.6f)
|
||||
.junkRateThreshold(0.2f)
|
||||
.recorder(null, 500, 500)
|
||||
.build())
|
||||
hasInit = true
|
||||
@@ -71,11 +71,10 @@ internal class MoGoBlockProviderImpl: IMoGoBlockProvider, IBlockListener {
|
||||
}
|
||||
val msg = GsonUtils.toJson(map)
|
||||
try {
|
||||
VLog.w(TAG, msg)
|
||||
VLogUtils.w(TAG, msg)
|
||||
} catch (t: Throwable) {
|
||||
Log.e(TAG, "onDumped error", t)
|
||||
}
|
||||
// linkedLog.record(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.os.HandlerCompat;
|
||||
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.config.JunkConfig;
|
||||
import com.mogo.eagle.core.function.api.devatools.perf.IMoGoCpuUsageProvider;
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.main.ARouterUtils;
|
||||
@@ -29,7 +29,7 @@ public class ThreadOptInitializer {
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return FunctionBuildConfig.isSupportJunkDetect;
|
||||
return JunkConfig.isSupportJunkDetect;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.mogo.eagle.core.data.config;
|
||||
|
||||
public class JunkConfig {
|
||||
|
||||
public static volatile boolean isSupportJunkDetect = false;
|
||||
}
|
||||
@@ -66,6 +66,8 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.material
|
||||
implementation rootProject.ext.dependencies.guava
|
||||
|
||||
compileOnly rootProject.ext.dependencies.apm_insight
|
||||
|
||||
implementation rootProject.ext.dependencies.gson
|
||||
implementation rootProject.ext.dependencies.glideanno
|
||||
implementation rootProject.ext.dependencies.glideokhttp3
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.mogo.eagle.core.utilcode.util
|
||||
|
||||
import android.util.Log
|
||||
import com.apm.insight.log.VLog
|
||||
|
||||
class VLogUtils {
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun d(tag: String, msg: String, max: Int = 4096) {
|
||||
handleMsg(msg, max).forEach {
|
||||
VLog.d(tag, it)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun v(tag: String, msg: String, max: Int = 4096) {
|
||||
handleMsg(msg, max).forEach {
|
||||
VLog.v(tag, it)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun w(tag: String, msg: String, max: Int = 4096) {
|
||||
handleMsg(msg, max).forEach {
|
||||
VLog.w(tag, it)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun e(tag: String, msg: String, max: Int = 4096) {
|
||||
handleMsg(msg, max).forEach {
|
||||
VLog.e(tag, it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleMsg(msg: String, max: Int = 4096): List<String> {
|
||||
val result = ArrayList<String>()
|
||||
try {
|
||||
var left = msg.length
|
||||
var begin = 0
|
||||
while (left > max) {
|
||||
val part = msg.substring(begin, begin + max)
|
||||
result += part
|
||||
begin += max
|
||||
left -= max
|
||||
}
|
||||
if (left > 0) {
|
||||
result += msg.substring(begin, begin + left)
|
||||
}
|
||||
} catch (t: Throwable) {
|
||||
Log.e(TAG, "error", t)
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user