systrace 是一种工具,它通过捕获和显示应用程序进程和其他 Android 系统进程的执行时间来帮助分析应用程序的性能。
使用 systrace 提供了多个命令行选项来捕获和可视化跟踪
我正在专门寻找选项 --from-file 的用法。从 Android Studio 页面:https ://developer.android.com/studio/profile/systrace-commandline.html
提到: --from-file=从文件创建交互式 Systrace 报告,而不是运行实时跟踪。
在 systrace.py 中,这是解释用法的代码片段。
parser.add_option('--from-file', dest='from_file', action='store',
help='read the trace from a file (compressed) rather than '
'running a live trace')
所以我们可以用命令可视化我们离线捕获的数据
python systrace.py --from-file systrace_check_zip
但我看到它总是返回 错误:
未捕获任何数据。未写入输出文件。
有人熟悉--from-file
吗?如何使用它 ?
我这样做错了吗?
注意我正在传递从 atrace 获取的压缩 (zip) 数据。