[6.2.0][技术优化] 打开监测开关

This commit is contained in:
renwj
2023-11-15 16:48:20 +08:00
parent 9edc1045c4
commit 1dcdac0015
15 changed files with 622 additions and 292 deletions

View File

@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.api.devatools.strict.*
import com.mogo.eagle.core.function.api.devatools.download.*
import com.mogo.eagle.core.function.api.devatools.logcat.*
import com.mogo.eagle.core.function.api.devatools.mofang.*
import com.mogo.eagle.core.function.api.devatools.perf.IMoGoCpuUsageProvider
import com.mogo.eagle.core.function.api.lookaround.*
import com.mogo.eagle.core.function.api.upgrade.*
@@ -238,4 +239,9 @@ interface IDevaToolsProvider : IProvider {
* 主线程卡顿监控
*/
fun block(): IMoGoBlockProvider?
/**
* 各线程CPU使用率
*/
fun usage(): IMoGoCpuUsageProvider?
}

View File

@@ -0,0 +1,14 @@
package com.mogo.eagle.core.function.api.devatools.perf
interface IMoGoCpuUsageProvider {
fun onProcessLaunched(time: Long)
fun startMainThreadTime(time: Long)
fun updateMainThreadTime(time: Long)
fun incrementOtherThreadUsage(group: String, t: Thread, usage: Long)
fun dump(): LinkedHashMap<String, Long>
}