周末在家,看了一下比较关注的Google I/O视频,其中在Introduction to Project Volta里面有个battery historian的工具,看着比较有意思,用Nexus 5刷了个Android L preview的版本试试。
使用battery historian步骤:
1、adb shell dumpsys batterystats --enable full-wake-history
2、adb shell dumpsys batterystats --reset
3、adb bugreport |tee bugreport.txt
4、python historian.py -a bugreport.txt | tee battery.html
用Chrome打开battery.html,可以看到:
beautiful!是不是似曾相识的感觉,如果你用过性能分析工具,不然Systrace、Ftrace、Arm Streamline等性能分析工具,那再熟悉不过了。
图形还是相当的漂亮。一个性能问题当你找不到解决方法的时候,最后用图形表示出来,看来Brendan D. Gregg话影响深远呀!
参考链接:
https://developer.android.com/preview/api-overview.html
http://forum.xda-developers.com/google-nexus-5/help/played-android-l-battery-historian-tool-t2808146
作者在文章中分享了如何使用batteryhistorian工具在Android L预览版上进行电池使用情况分析的过程。通过一系列步骤,从启用完整的唤醒历史记录到生成详细的报告,读者可以直观地看到设备的电池使用情况,并将其以图形形式展示出来,便于理解。此工具的使用体验被形容为与性能分析工具类似,提供了深入的洞察,帮助用户优化设备性能。
4804

被折叠的 条评论
为什么被折叠?



