首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用Xcode12 xctrace命令行工具自动分析iOS

使用Xcode12 xctrace命令行工具自动分析iOS
EN

Stack Overflow用户
提问于 2020-12-01 22:43:54
回答 1查看 764关注 0票数 0

我正在尝试使用Xcode 12 Instruments开发工具自动化性能测试,需要一些帮助。

我想把.trace文件解析成可读的格式,并想在控制台上打印泄漏/CPU使用情况。我使用下面的xctrace命令行通过Xcode 12 Instruments工具自动进行泄漏/时间分析:

xcrun xctrace record --device "udid" --template "Leaks" --time-limit 10m --attach "PID" --output "xyz.trace"

xcrun xctrace export --input "xyz.trace" toc --output "xyz.xml"

如果有人能帮上忙那就太好了。

供参考的跟踪文件:https://gofile.io/d/EpvOXa

EN

回答 1

Stack Overflow用户

发布于 2021-05-15 03:03:08

我不确定我是否正确理解了您的问题,但如果我运行您的命令,我会收到一条错误消息。CLI-tool给了我以下说明:

代码语言:javascript
运行
复制
usage: xctrace export [<options>] [--toc | --xpath expression]

description:
    Export given .trace using supplied query to the XML file format that can be later read and post-processed

options:
    --input <file>              Export data from the given .trace file
    --output <path>             Command output is written to the given path, if specified
    --toc                       Present entities to export in the table of contents form
    --xpath <expression>        Choose elements to export using specified XPath expression

notes:
    If output path is not specified, the export operation output will be written to the standard output.
    Table of Contents and XPath query are two separate modes and they cannot be specified together.

examples:
    xctrace export --input input.trace --toc
    xctrace export --input input.trace --toc --output table_of_contents.xml
    xctrace export --input input.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="my-table-schema"]'

根据这一点,参数toc缺少两个破折号。我希望这能帮你解决这个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65092680

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档