天天看点

20180828 com.tencent.mtt 待机功耗现象

1. BugRepot 现象

17:01:21 - 11:01:49 18h 0m 28s 601ms,耗电量(94%-81% = 13%)

20180828 com.tencent.mtt 待机功耗现象

2. 功耗现象分析

2.1 待机测试中 com.tencent.mtt 一直处于前台进程

20180828 com.tencent.mtt 待机功耗现象
Top app
Aug  
:: - ::
+h25m58s859ms to +h26m59s438ms
active duration: m s ms
 occurences

Top app         | Number of times | Total duration
com.tencent.mtt |                | m s ms   
           

com.tencent.mtt.account.sync/com.tencent.mtt/QQ浏览器,处于Top进程,暗屏待机下,通过

JobScheduler 和 SyncManager 进行唤醒CPU,由于互联网特性,QQ浏览器需要调度网络,导致功耗一直无法减低下来。

Application com.tencent.mtt
Version Name    
Version Code    
UID 
Device estimated power use  %
Foreground   times over m s ms
Vibrator use     times over s ms
CPU user time   s ms
CPU system time s ms
Device estimated power use due to CPU usage %
Total number of wakeup alarms   
 Network Information:
Search:
Mobile data transferred  bytes total ( bytes received,  bytes transmitted)
Mobile data transferred in the background    bytes total ( bytes received,  bytes transmitted)
Wifi data transferred    MB total ( MB received,  KB transmitted)
Wifi data transferred in the background  bytes total ( bytes received,  bytes transmitted)
Mobile packets transferred   total ( received,  transmitted)
Mobile packets transferred in the background    NaN total (undefined received, undefined transmitted)
Wifi packets transferred     total ( received,  transmitted)
Wifi packets transferred in the background  NaN total (undefined received, undefined transmitted)
Mobile active time  
Mobile active count 
Full wifi lock time 
Wifi scan count 
Wifi scan time  s ms
Wifi idle time  
Wifi transfer time  ms total ( receiving, transmitting)
Wifi idle time  s
Wifi transfer time  ms total (ms receiving, ms transmitting)
 Syncs:
Show  entriesSearch:
Sync Name   Total Time  Count
com.tencent.mtt.account.sync/com.tencent.mtt.account.sync/QQ浏览器 s ms    
Showing  to  of  entriesPrevious1Next
 Wakelocks:
Show  entriesSearch:
Wakelock Name   Full Time   Full Count  Minimum total partial Time  Partial Count   Window Time Window Count
*vibrator*         s ms           
*alarm*        ms         
*sync*/com.tencent.mtt.account.sync/com.tencent.mtt.account.sync/XXX           ms         
*job*/com.tencent.mtt/.browser.push.external.account.JobschedulService         ms          
LocationManagerService                    
Showing  to  of  entriesPrevious12Next
 Services:
Show  entriesSearch:
Service Name    Time spent started  # starts    # launches
com.tencent.mtt.browser.push.service.PushRemoteService  h m s ms       
com.tencent.mtt.browser.push.service.PushRemoteService$InnerService    ms       
com.tencent.mtt.browser.push.external.account.JobschedulService        
com.tencent.mtt.browser.push.external.account.SyncService          
com.tencent.mtt.BrowserService         
Showing  to  of  entriesPrevious1Next
 Process info:
Show  entriesSearch:
Process Name    User Time   System Time Foreground Time # Starts    # ANRs  # Crashes
com.tencent.mtt s ms   s ms    s ms         
com.tencent.mtt:service s ms    s ms              
sh  ms    ms             
Showing  to  of  entriesPrevious1Next
 Scheduled Job:
Show  entriesSearch:
Job Name    Total Time  Count
com.tencent.mtt/.browser.push.external.account.JobschedulService    s ms    
Showing  to  of  entries
           

3. 功耗现象解决

  1. 根据测试用例进行测试,待机下统一回到桌面进行待机,这样后台管理就可以有效的管住功耗
  2. 待机工程中,尤其是长时间的待机下对JobScheduler 和 SyncManager进行严格管理
com.tencent.mtt.browser.push.external.account.JobschedulService
com.tencent.mtt.browser.push.external.account.SyncService
           
  1. 延长深度Doze的持续时间,该模式下BugReport中几乎无应用层唤醒