Create, Save, and Open Trace Documents

在仪器中,所有的工作都是在跟踪文档中完成的,其中包含一组工具、它们的配置设置和它们收集的数据。一旦您使用跟踪文档来配置应用程序,就可以保存文档以保存收集的跟踪数据,并稍后再打开以便查看和分析。In Instruments, all work is done in a trace document, which contains a set of instruments, their configured settings, and the data they have collected. Once you profile an app with a trace document, you can save the document to preserve the trace data you have gathered and open it again later for viewing and analysis.

关于仿形模板About Profiling Templates

当设备启动时,它提供了一个分析模板(见图6-1)。每个模板包含一组工具,这些工具通常用于分析应用程序并收集有用信息,以帮助识别问题或提高应用程序的效率。When Instruments first starts up, it provides a list of profiling templates (see Figure 6-1). Each template contains a collection of instruments that are commonly used together to analyze an app and gather useful information in order to help identify problems or make your app more efficient.

Figure 6-1The profiling template selection dialog

如果需要为特定目的收集数据,您应该计划使用分析模板作为起点。例如,如果要检查内存问题的应用程序,应该选择与内存相关的模板,如分配、泄漏或僵尸。在使用模板创建跟踪文档之后,您可以随时添加或删除单个工具或重新配置工具。You should plan to use a profiling template as a starting point whenever you need to collect data for a particular purpose. For example, if you want to check your app for memory problems, you should choose a memory-related template, such as Allocations, Leaks, or Zombies. After using a template to create a trace document, you can always add or remove individual instruments, or reconfigure instruments, as needed.

有关可用模板及其所包含的工具的完整列表,请参见分析模板。For a complete list of available templates and the instruments they contain, see Profiling Templates.

创建跟踪文档Create a Trace Document

您需要创建跟踪文档以开始使用工具进行分析。You need to create a trace document to begin profiling with Instruments.

创建跟踪文档To create a trace document
  1. 运载工具。Launch Instruments.

  2. 在出现的分析模板选择对话框中,选择目标设备和进程。In the profiling template selection dialog that appears, select a target device and process.

  3. 选择所需的分析模板。Select the desired profiling template.

  4. Click Choose.

创建一个新的文档与预先设定的工具由您所选择的模板。A new document is created with the preconfigured instruments from the template you chose.

TIP

要在创建跟踪文档后自动开始对应用程序进行即时分析,请在分析模板选择对话框中按住选项键。执行此操作时,“选择”按钮会更改为配置文件。单击概要文件创建文档并立即开始分析。To automatically begin profiling your app immediately after creating the trace document, hold down the Option key in the profiling template selection dialog. When you do this, the Choose button changes to Profile. Click Profile to create the document and initiate profiling right away.

如果您找不到满足您需要的模板,或者只想从头创建自己的模板,请在剖析模板选择对话框中选择空白模板。If you can’t find a template to meet your needs or you just want to create your own from scratch, select the Blank template in the profiling template selection dialog.

保存跟踪文档Save a Trace Document

创建跟踪文档后,可以保存它以备以后参考。仪器将跟踪文档保存为跟踪扩展的工具跟踪文件。Once you’ve created a trace document, you can save it for later reference. Instruments saves trace documents as Instruments trace files with the .trace extension.

To save a trace document
  1. Create a trace document. See To create a trace document.

  2. Choose File > Save. Or, choose File > Save As if you want to save a previously saved trace document as a new file.

  3. Enter a name for the file.

  4. Choose a destination for the file.

  5. Click Save.

保存跟踪文档作为分析模板Save a Trace Document as a Profiling Template

如果您创建了一个跟踪文档,您认为您可能需要再次分析其他应用程序,您可以将其保存为一个自定义模板,这样每次运行工具时不必重新创建它。If you create a trace document you think you might need again for profiling other apps, you can save it as a custom template so you don’t have to recreate it each time you run Instruments.

将跟踪文档保存为分析模板To save a trace document as a profiling template
  1. Create or open a trace document. See To create a trace document.

  2. Choose File > Save As Template.

  3. Enter a name for the template.

  4. Choose a destination for the template.

    将您的模板保存在用户/目录/应用程序支持/工具/模板目录中,以便在工具模板窗口的自定义部分中使用它。这是“保存为模板”对话框中的默认目录。Save your template in the /Users/<username>/Library/Application Support/Instruments/Templates directory to make it available in the custom section of the Instruments template window. This is the default directory in the Save As Template dialog.

  5. Select an icon for the template.

  6. Enter a description for the template.

  7. Click Save.

    保存模板后,它会自动出现在分析模板选择对话框中,并与自定义模板分组。下次创建跟踪文档时,可以选择它作为起始点。Once you save a template, it automatically appears in the profiling template selection dialog, grouped with the Custom templates. Next time you create a trace document, you can select it as your starting point.

Close a Trace Document

To close an opened trace document
  1. Choose File > Close (or press Command-W).

  2. If your document contains unsaved data, select whether to save the updated document.

The document closes.

Open a Trace Document

To open a saved trace document

Do one of the following:

  • Double-click the .trace document file in the Finder.

  • Drag the .trace document file onto the Instruments app icon.

  • Open Instruments and perform the following steps:

    1. Choose File > Open (or press Command-O).

    2. Locate a saved .trace document file.

    3. Click Open.

The trace document opens in Instruments.

转载于:https://www.cnblogs.com/zyingn/p/Create_Save_and_Open_Trace_Documents.html

Create, Save, and Open Trace Documents相关推荐

  1. SP2-0110: Cannot create save file afiedt.buf

    sp2-0110:无法创建保存文件"afiedt.buf" 出处:此问题是由于使用 define _editor=vim 时,用ed更改时报错 问题原因:Cannot create ...

  2. Instrument(一)

    instrument 概述 Instruments is a powerful and flexible performance-analysis and testing tool that's pa ...

  3. Instrument(二)

    create,save,and open tarce documents 创建.保存和打开跟踪文档 Create a trace document 创建跟踪文档 You need to create ...

  4. Oracle trace level

    Oracle 诊断事件编码及内容. 10000 control file debug event, name 'control_file' 10001 control file crash event ...

  5. 【错误记录】Android 文件查看错误 ( Error opening contents of device file ““: Cannot create directory )

    文章目录 一.报错信息 二.解决方案 一.报错信息 Error opening contents of device file "hello.txt": Cannot create ...

  6. SQL Server中追踪器Trace的介绍和简单使用-----(转)

    一.What is Trace? 对于SQL Profiler这个工具相信大家都不是很陌生,没用过的朋友可以在SQL Server Management Studio>工具>SQL Ser ...

  7. SQL Server中追踪器Trace的介绍和简单使用

    原文:SQL Server中追踪器Trace的介绍和简单使用 一.What is Trace? 对于SQL Profiler这个工具相信大家都不是很陌生,没用过的朋友可以在SQL Server Man ...

  8. php方法帮助文档,Trace方法_帮助文档_Thinkphp手册

    Trace方法_帮助文档_Think 页面Trace只能用于有页面输出的情况,但是trace方法可以用在任何情况,而且trace方法可以用于AJAX等操作. Trace方法的格式:trace('变量' ...

  9. 使用隐含Trace参数诊断Oracle Data Pump(expdp)故障

    使用隐含Trace参数诊断Oracle Data Pump(expdp)故障 Data Pump数据泵是Oracle从10g开始推出的,用于取代传统exp/imp工具的数据备份还原组件.经过若干版本的 ...

最新文章

  1. poj 1637 Sightseeing tour
  2. Android版本dp,Android中sp和dp区别
  3. MySql数据库explain用法示例_mysql explain的用法
  4. SAP UI5 日期类型 sap.ui.model.type.Date 的解析格式问题分析
  5. 【图像处理】——鼠标点击图像的一处,获得点击点的坐标值
  6. 验证Java编程环境是否成功时出现“'javac'不是内部或外部命令,也不是可运行的程序或批处理文件”
  7. C++ 常见编译错误解决办法
  8. 有关MongoVUE工具的简单使用---查询和导出
  9. 仿城通网盘下载页面源码
  10. [TcaplusDB] 行业新闻汇编(6月29日)
  11. 你所不知的有趣投影方法
  12. 每天盯着电脑,眼睛疲劳怎么办?
  13. 身体指数bmi流程图_【新城校区】新生体检丨你了解你的身体吗?
  14. 电大计算机试题及答案形成性,国开电大机械CAD/CAM形成性作业1答案
  15. 两种Random函数的使用
  16. WebView加载页面出现白屏解决方案
  17. Android Java 必备:Socket通信
  18. 实现iOS应用图标右上角数字badge number提醒
  19. oracle编码转换utf16,oracle编码转换:AL32UTF8-ZHS16GBK
  20. it转正述职报告_it行业试用期转正工作总结

热门文章

  1. 用肖像画追踪历史上的信任度变化 |《自然-通讯》论文
  2. 自动驾驶关键技术报告:惯性导航和背后的芯片大战
  3. 美媒评2018年全球十大突破性技术:AI和人工胚胎上榜
  4. 如果重走职场,一定会送自己 8 个锦囊
  5. 微软转向,鸿蒙拥抱,炒房团都来了,Linux 为何引各方英雄竞折腰?
  6. linux下生成https的crt和key证书
  7. FFMPEG视音频编解码学习(1)
  8. 远程桌工具-Remote Desktop Organizer
  9. Oracle Study之--Oracle触发器(Trigger)
  10. 肯尼亚政府部署RFID系统进行车辆识别登记