[3.4.0][线程] 升级线程库和插件版本

This commit is contained in:
renwj
2023-07-17 20:51:49 +08:00
parent e60f6b6271
commit f3d30026ce
4 changed files with 19 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ buildscript {
classpath "com.mogo.cloud:hook:${service_chain_version}"
classpath "com.mogo.cloud:bizconfig:${plugin_version}"
classpath 'com.volcengine:apm_insight_plugin:1.4.2'
classpath "com.mogo.thread.opt:plg:${plugin_version}"
classpath "com.mogo.thread.opt:plg:10.2.0_mogo"
classpath "com.mogo.cloud:systrace:${plugin_version}"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
classpath "com.mogo.sticky:service:${plugin_version}"

View File

@@ -214,7 +214,7 @@ ext {
//========================= autosize ======================
androidautoSize : 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1',
thread_opt : "com.mogo.thread.opt:lib:10.1.2_mogo",
thread_opt : "com.mogo.thread.opt:lib:10.2.0_mogo",
weak_network : "com.mogo.weak:network:1.0.0",
btrace : "com.bytedance.btrace:rhea-core:2.0.0",

View File

@@ -2,9 +2,12 @@ package com.mogo.eagle.core.function.startup.stageone
import android.content.*
import android.os.Process
import android.os.Trace
import android.util.*
import com.mogo.thread.ext.core.*
import com.mogo.thread.ext.core.config.*
import com.mogo.thread.ext.core.config.priority.*
import com.mogo.thread.ext.core.trace.*
import com.rousetime.android_startup.*
import java.io.*
import java.text.*
@@ -23,6 +26,18 @@ class ThreadOptStartup: AndroidStartup<Boolean>() {
.setPriority("GLThread\\s+\\d+", Process.THREAD_PRIORITY_BACKGROUND)
.setPriority("Dispatch-\\w+", Process.THREAD_PRIORITY_BACKGROUND)
.build())
.traceConfig(TraceConfig.Builder()
.enabled(false)
.trace(object : ITrace {
override fun enter(section: String) {
//Trace.beginSection(section)
//Log.d("TTTTTT", "enter->$section" )
}
override fun exit() {
//Trace.endSection()
}
})
.build())
/*.dump(DumpConfig.Builder()
.dumpLogFilePath(File(context.getExternalFilesDir(null), "thread_dump_log_${ SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.ROOT).format(Date()) }.txt").absolutePath)
.dumpPeriod(5, SECONDS)

View File

@@ -3,5 +3,7 @@ thread_opt {
enable true
enableInDebug true
logLevel "DEBUG"
trace_enable !rootProject.isReleaseBuild()
//thread_replace_with_coroutine false
}