• Export and Import Trace Data


    导出和导入跟踪数据Export and Import Trace Data

    仪器提供多种方法来导出和导入数据,用于合并、存档、仪器内部分析和通过其他工具进行外部分析。Instruments offers a variety of ways to export and import data for consolidation, archival purposes, analysis within Instruments, and external analysis through other tools.

    出口数据跟踪Export Trace Data

    您可以将跟踪文档中的数据导出为逗号分隔值(CSV)文件格式,这是由许多应用程序支持的简单数据文件格式,包括大多数数据库和电子表格应用程序。通过将数据带到另一个应用程序(如数字)中,您可以进一步操作它,执行额外的分析,生成定制的图表和图表,并将其与其他数据进行比较,等等。You can export data from a trace document to a comma-separated value (CSV) file format, a simple data file format supported by many apps, including most database and spreadsheet apps. By bringing data into another app, such as Numbers, you can manipulate it further, perform additional analysis, generate custom charts and graphs, compare it to other data, and more.

    NOTE

    导出的数据设计为与外部应用程序共享,而不是重新导入到仪器中。如果您想保存跟踪数据的仪器格式,您应该保存您的跟踪文件,连同其收集的结果,以便您可以稍后再打开它。Exported data is designed to be shared with external apps, and not re-imported into Instruments. If you want to save trace data in Instruments format, you should save your trace document, along with its collected results, so you can open it again later.

    以CSV格式导出跟踪数据To export trace data in CSV format
    1. 在使用跟踪文档分析应用程序后,选择包含要导出的数据的工具。After profiling an app with a trace document, select the instrument containing the data you want to export.

      image: ../Art/instruments_trace_document_strategy_pane_selectedinstrument_2x.png
    2. Choose Instrument > Export Track for instrumentname.

      image: ../Art/instruments_instrument_menu_exporttrack_menuitem_2x.png
    3. Enter a name for the file.

      image: ../Art/instruments_exporttrackdata_dialog_2x.png
    4. 指定文件的目的地。Specify a destination for the file.

    5. Click Save.

    Instruments exports the data for the most recent run of the selected instrument.

    NOTE

    Not all instruments support exporting to the CSV file format.

    从设备导入数据Import Data from a Device

    OS设备可以被配置为记录与能量相关的信息,然后您可以导入到分析工具中。直接在iOS设备上看到日志能量使用的测量能量影响。An iOS device can be configured to log energy-related information, which you can then import into Instruments for analysis. See Log Energy Usage Directly on an iOS Device in Measure Energy Impact.

    从(示例)命令行工具导入数据Import Data from the (sample) Command-Line Tool

    如果使用示例命令行工具对应用程序的执行进行统计分析,可以导入示例数据并在工具中查看它。从样例工具导入数据创建一个新的跟踪文档,并将示例数据加载到详细窗格中。因为样本不包含时间戳信息,所以只能在详细窗格中使用大纲模式查看数据。根据您选择的文件创建一个新的跟踪文档。If you use the sample command-line tool to do a statistical analysis of your app’s execution, you can import your sample data and view it in Instruments. Importing data from the sample tool creates a new trace document with the Sampler instrument and loads the sample data into the detail pane. Because the samples do not contain time stamp information, you can only view the data using outline mode in the detail pane. A new trace document is created based on the file you select.

    使用示例工具分析应用程序To analyze an app using the sample tool
    1. 启动终端应用程序。Launch the Terminal app.

    2. 输入一个示例命令,例如:Enter a sample command, such as:

      • 样本listerosx文件~ /桌面/ SampleData.txtsample ListerOSX -file ~/Desktop/SampleData.txt

      这个示例将应用程序采样10秒(默认值),并将结果保存到桌面上的文件中。This example samples an app for 10 seconds (the default), and saves the results to a file on the desktop.

    将数据从示例工具导入到工具分析模板中To import data from the sample tool into an Instruments profiling template
    1. Choose File > Import Data.

      image: ../Art/instruments_file_menu_importdata_menuitem_2x.png
    2. 找到保存的数据。Locate your saved data.

    3. 在导入跟踪窗口的底部选择“导入数据的选择工具”弹出菜单。如果此弹出菜单不可见,请单击“选项”按钮显示它。Choose Sampler from the “Choose Instrument to Import Data” pop-up menu at the bottom of the Import Trace window. If this pop-up menu isn’t visible, click the Options button to display it.

      image: ../Art/instruments_importdata_dialog_2x.png
    4. Click Open.

      创建了一个包含采样器工具的新跟踪文档,它包含了您导入的数据。A new trace document containing the Sampler instrument is created, and it’s populated with the data you imported.

      image: ../Art/instruments_trace_document_importedsamplerdata_2x.png

    NOTE

    时间线窗格不显示导入数据的图形视图,但导入的数据可以在详细窗格中进行分析。The timeline pane does not display a graphical view of imported data, but the imported data may be analyzed in the detail pane.

  • 相关阅读:
    Linux 下卸载MySQL 5
    Solr使用入门指南
    GridView行编辑、更新、取消、删除事件使用方法
    从最大似然到EM算法浅解
    MySQL中数据表的增操作
    趣味Java算法题(附答案)
    nodeValue的兼容问题
    边记边学PHP-(十五)MySQL数据库基础操作2
    素数推断算法(高效率)
    expect
  • 原文地址:https://www.cnblogs.com/zyingn/p/Export_and_Import_Trace_Data.html
Copyright © 2020-2023  润新知