[6.2.0][技术优化] 代码逻辑优化

This commit is contained in:
renwj
2023-12-01 18:03:50 +08:00
parent 2bf65101ce
commit d587c809de
10 changed files with 82 additions and 26 deletions

View File

@@ -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()

View File

@@ -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)
}
})
}