[ByteX][Systrace]添加插件,配合systrace检测工程侧性能问题

[ByteX][Systrace]添加插件,配合systrace检测工程侧性能问题

[Systrace]添加systrace打点插件,方便调试应用侧性能问题
This commit is contained in:
renwj
2022-01-06 15:01:25 +08:00
parent 8eb3439bfd
commit 21cf02343f
2 changed files with 51 additions and 1 deletions

View File

@@ -19,13 +19,61 @@ apply plugin: 'bytex.threadOpt'
thread_opt {
enable true
enableInDebug true
rxJavaIoReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getIoPool@@()Ljava/util/concurrent/ExecutorService;'
rxJavaComputationReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getCpuPool@@()Ljava/util/concurrent/ExecutorService;'
coroutineIoReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getIoPool@@()Ljava/util/concurrent/ExecutorService;'
coroutineDefaultReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getCpuPool@@()Ljava/util/concurrent/ExecutorService;'
}
/**
* 方便使用systrace工具在工程侧打点便于分析工程侧性能问题
*/
apply plugin: 'bytex.systrace'
systrace {
/**
* 交付时要关闭,会有性能损耗
*/
enable false
enableInDebug false
/**
* - 是否使用[Trace.beginAsyncSection(String, int)/Trace.endAsyncSection(String, int)]进行打点
* - 默认使用[Trace.beginSection(String)/Trace.endSection()]进行打点
*/
isTraceAsync false
/**
* - 是否在运行时只针对主线程打点,其它线程不打
*/
isOnlyMainThread false
/**
* - 是否忽略对类的静态构造方法打点
* - 默认不忽略
*/
isIgnoreClinitMethod false
/**
* - 是否忽略对类中的简单方法打点
* 简单方法定义:
* - 空方法
* - get/set 方法
* - 单独的方法,方法体内没有调用其它方法
* - 默认不忽略
*/
isIgnoreSampleMethod false
/**
* - 针对特定类集合,配置打点白名单,在此集合中的类中的所有方法不打点
* - 支持正则表达式
*/
whiteListForClass = []
/**
* - 针对特定包名集合,配置打点白名单,所有类以此包名为前缀的类不打点
* - 支持正则表达式
*/
whiteListForPackage = []
}
/*apply plugin: 'chain.log.hook'
hooklog{
enableLoggerToServer true

View File

@@ -34,6 +34,8 @@ buildscript {
classpath "com.mogo.cloud:hook:${HOOK_LOG_VERSION}"
classpath 'com.volcengine:apm_insight_plugin:1.4.1'
classpath 'com.mogo.cloud:thread_opt:1.0.0'
classpath 'com.mogo.cloud:systrace:1.0.1'
// classpath "com.bytedance.android.byteX:base-plugin:0.3.0"
// classpath "com.mogo.cloud:hook:${HOOK_LOG_VERSION}"