[6.2.0][技术优化] 优化记录消息实体获取(读写锁)获取逻辑
This commit is contained in:
@@ -57,8 +57,8 @@ internal class MoGoBlockProviderImpl: IMoGoBlockProvider, IBlockListener {
|
||||
val processUsage = cpu.remove("ProcessUsage")
|
||||
if (mainThreadUsage != null && processUsage != null) {
|
||||
map["cpu"] = ArrayList<String>().also {
|
||||
it.add("MainThread: ${ "%.2f".format(mainThreadUsage * 1.0f * 100 / processUsage) }% ($mainThreadUsage, $processUsage)")
|
||||
cpu.entries.sortedByDescending { e ->
|
||||
it.add("main-thread: ${ "%.2f".format(mainThreadUsage * 1.0f * 100 / processUsage) }% ($mainThreadUsage, $processUsage)")
|
||||
for (e in cpu.entries.sortedByDescending { e -> e.value }) {
|
||||
it.add("${e.key}: ${ "%.2f".format(e.value * 1.0f * 100 / processUsage) }% (${e.value}, $processUsage)")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user