android4.1~Systrace
来源:互联网 发布:brew install php fpm 编辑:程序博客网 时间:2024/06/10 02:27
你现在使用的是android4.1吗,如果不是,还等什么呢,赶快升级吧,更多新的特性等着你,现在就简单介绍一下我们在新版本开发中德新工具吧,原文:
Systrace
The systrace
tool helps analyze the performance of your application by capturing and displaying execution times of your applications processes and other Android system processes. The tool combines data from the Android kernel such as the CPU scheduler, disk activity and application threads to generate an HTML report that shows an overall picture of an Android device’s system processes for a given period of time.
The systrace
tool is particularly useful in diagnosing display problems where an application is slow to draw or stutters while displaying motion or animation. For more information on how to use systrace
, see Analyzing Display and Performance with Systrace.
Usage
In order to run systrace
, the adb
tool and Python must be installed and included in your development computer's execution path. In order to generate a trace, you must connect a device running Android 4.1 (API Level 16) or higher to your development system using a USB debugging connection.
The syntax for running systrace
is as follows.
$> python systrace.py [options]
Here is an example execution run that sets trace tags and generates a trace from a connected Android device.
$> cd android-sdk/tools/systrace$> python systrace.py --set-tags gfx,view,wm$> adb shell stop$> adb shell start$> python systrace.py --disk --time=10 -o mynewtrace.html
Options
The table below lists the command line options for systrace
.
-o <FILE>
Write the HTML trace report to the specified file.-t N, --time=N
Trace activity for N seconds. Default value is 5 seconds.-b N, --buf-size=N
Use a trace buffer size of N kilobytes. This option lets you limit the total size of the data collected during a trace.-d, --disk
Trace disk input and output activity. This option requires root access on the device.-f, --cpu-freq
Trace CPU frequency changes. Only changes to the CPU frequency are logged, so the initial frequency of the CPU when tracing starts is not shown.-i, --cpu-idle
Trace CPU idle events.-l, --cpu-load
Trace CPU load. This value is a percentage determined by the interactive CPU frequency governor.-s, --no-cpu-sched
-w, --workqueue
Trace kernel work queues. This option requires root access on the device.--set-tags=<TAGS>
Set the enabled trace tags in a comma separated list. The available tags are:gfx
- Graphicsinput
- Inputview
- Viewwebview
- WebViewwm
- Window Manageram
- Activity Managersync
- Sync Manageraudio
- Audiovideo
- Videocamera
- Camera
Note: When setting trace tags from the command line, you must stop and restart the framework ($> adb shell stop; adb shell start
) for the tag tracing changes to take effect.
--link-assets
Link to the original CSS or JS resources instead of embedding them in the HTML trace report.-h, --help
You can set the trace tags for systrace
with your device's user interface, by navigating to Settings > Developer options > Monitoring > Enable traces.
Trace Viewing Shortcuts
The table below lists the keyboard shortcuts that are available while viewing a systrace
trace HTML report.
上面介绍的很详细,简单描述可为系统操作的跟踪,你可以用它来更快的获取其系统运行时的相关状态,并找到相关问题,自己去尝试一下吧
- android4.1~Systrace
- Systrace
- Android4.1
- Android systrace
- Systrace Walkthrough
- Android Systrace
- systrace tunning
- Systrace工具
- Systrace演练
- Android Systrace
- Android Systrace
- Android4.0和Android4.1全屏方法
- Android4.0和Android4.1全屏方法
- 下载Android4.1源码
- Android4.1APi MediaPlayer
- Android4.1 InputManagerService 流程
- android4.1源码下载
- Android4.1 新功能
- sed 命令
- Entity SQL 使用技巧
- Struts2的dojo使用与/template/ajax/head.ftl not found
- 学习方法
- 杭电OJ题 1106 排序 解题报告
- android4.1~Systrace
- servlet3.1规范翻译:前言
- SharePoint 2010 安装前提条件下载链接搜集
- cocos2d-x学习笔记09:动作2:持续动作
- 朴素贝叶斯算法入门
- Time_wait句柄
- ListView多次调用getView方法
- 学习c++的必看!!!
- 用栈逆置一个线性表