Merge branch 'dev_robotaxi-d_231031_6.2.0' into dev_robotaxi-d_231129_6.2.2_routing_verify
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -328,13 +328,4 @@ object FunctionBuildConfig {
|
||||
@Volatile
|
||||
@JvmField
|
||||
var isFaultSlowDown = true
|
||||
|
||||
|
||||
/**
|
||||
* 是否支持卡顿检测
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var isSupportJunkDetect = false
|
||||
|
||||
}
|
||||
@@ -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