版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/su749520/article/details/82145333
1. BugRepot 现象
17:01:21 - 11:01:49 18h 0m 28s 601ms,耗电量(94%-81% = 13%)
2. 功耗现象分析
2.1 待机测试中 com.tencent.mtt 一直处于前台进程
Top app
Aug 21 2018
22:16:11 - 22:17:12
+5h25m58s859ms to +5h26m59s438ms
active duration: 1m 0s 579ms
1 occurences
Top app | Number of times | Total duration
com.tencent.mtt | 1 | 1m 0s 579ms
com.tencent.mtt.account.sync/com.tencent.mtt/QQ浏览器,处于Top进程,暗屏待机下,通过
JobScheduler 和 SyncManager 进行唤醒CPU,由于互联网特性,QQ浏览器需要调度网络,导致功耗一直无法减低下来。
Application com.tencent.mtt
Version Name 8.2.0.3950
Version Code 8203950
UID 10128
Device estimated power use 0.01%
Foreground 12 times over 7m 18s 962ms
Vibrator use 17 times over 6s 100ms
CPU user time 43s 15ms
CPU system time 19s 165ms
Device estimated power use due to CPU usage 0.00%
Total number of wakeup alarms 42
Network Information:
Search:
Mobile data transferred 0.00 bytes total (0.00 bytes received, 0.00 bytes transmitted)
Mobile data transferred in the background 0.00 bytes total (0.00 bytes received, 0.00 bytes transmitted)
Wifi data transferred 6.68 MB total (6.29 MB received, 396.98 KB transmitted)
Wifi data transferred in the background 0.00 bytes total (0.00 bytes received, 0.00 bytes transmitted)
Mobile packets transferred 0 total (0 received, 0 transmitted)
Mobile packets transferred in the background NaN total (undefined received, undefined transmitted)
Wifi packets transferred 10054 total (5226 received, 4828 transmitted)
Wifi packets transferred in the background NaN total (undefined received, undefined transmitted)
Mobile active time
Mobile active count 0
Full wifi lock time
Wifi scan count 1
Wifi scan time 2s 417.50ms
Wifi idle time
Wifi transfer time 0ms total ( receiving, transmitting)
Wifi idle time 0s
Wifi transfer time 0ms total (0ms receiving, 0ms transmitting)
Syncs:
Show entriesSearch:
Sync Name Total Time Count
com.tencent.mtt.account.sync/com.tencent.mtt.account.sync/QQ浏览器 1s 345ms 23
Showing 1 to 1 of 1 entriesPrevious1Next
Wakelocks:
Show entriesSearch:
Wakelock Name Full Time Full Count Minimum total partial Time Partial Count Window Time Window Count
*vibrator* 0 6s 694ms 7 0
*alarm* 0 328ms 15 0
*sync*/com.tencent.mtt.account.sync/com.tencent.mtt.account.sync/XXX 0 292ms 15 0
*job*/com.tencent.mtt/.browser.push.external.account.JobschedulService 0 94ms 29 0
LocationManagerService 0 0 0
Showing 1 to 5 of 6 entriesPrevious12Next
Services:
Show entriesSearch:
Service Name Time spent started # starts # launches
com.tencent.mtt.browser.push.service.PushRemoteService 3h 51m 53s 815ms 1 1
com.tencent.mtt.browser.push.service.PushRemoteService$InnerService 38ms 1 1
com.tencent.mtt.browser.push.external.account.JobschedulService 0 38
com.tencent.mtt.browser.push.external.account.SyncService 0 23
com.tencent.mtt.BrowserService 0 1
Showing 1 to 5 of 5 entriesPrevious1Next
Process info:
Show entriesSearch:
Process Name User Time System Time Foreground Time # Starts # ANRs # Crashes
com.tencent.mtt 27s 580ms 9s 290ms 19s 990ms 1 0 0
com.tencent.mtt:service 7s 380ms 7s 870ms 1 0 0
sh 10ms 820ms 0 0 0
Showing 1 to 3 of 3 entriesPrevious1Next
Scheduled Job:
Show entriesSearch:
Job Name Total Time Count
com.tencent.mtt/.browser.push.external.account.JobschedulService 1s 174ms 38
Showing 1 to 1 of 1 entries
3. 功耗现象解决
- 根据测试用例进行测试,待机下统一回到桌面进行待机,这样后台管理就可以有效的管住功耗
- 待机工程中,尤其是长时间的待机下对JobScheduler 和 SyncManager进行严格管理
com.tencent.mtt.browser.push.external.account.JobschedulService
com.tencent.mtt.browser.push.external.account.SyncService
- 延长深度Doze的持续时间,该模式下BugReport中几乎无应用层唤醒