Navigate the Timeline Pane

本文介绍如何使用时间轴面板来分析应用程序的性能数据。通过放大、缩小功能,您可以聚焦于特定时间段内的数据细节;通过筛选功能,您可以查看特定时间范围内的事件;还可以设置标记以便快速定位到关键数据点。

Navigate the Timeline Pane

他最突出的部分跟踪文件的时间窗格,提出各仪器收集的数据的基于时间的视图(参见图11-1)。这个窗格可以很容易地在你的应用程序中发现趋势和潜在问题领域。例如,内存使用图中的一个尖峰表示应用程序分配的内存比平常多。这个峰值可能是正常的,或者可能表明您的代码创建了比预期的更多的对象或内存缓冲区。诸如泄漏之类的工具也可以识别应用程序不正确处理内存的地方。如果泄漏时间线跟踪是人烟稀少,你知道你的应用程序是正确的行为。如果磁道不是空的,您可能要检查为什么。The most prominent portion of a trace document is the timeline pane, which presents a time-based view of the data gathered by each instrument (see Figure 11-1). This pane makes it easy to spot trends and potential problem areas in your app at a glance. For example, a spike in a memory usage graph indicates a time when your app allocated more memory than usual. This spike might be normal, or it might indicate that your code created more objects or memory buffers than you anticipated. An instrument such as Leaks can also identify where your app is not handling memory properly. If the Leaks timeline track is sparsely populated, you know that your app is behaving properly. If the track is not empty, you might want to examine why.

Figure 11-1跟踪文档的时间线窗格The timeline pane of a trace documentimage: ../Art/instruments_trace_document_timeline_pane_2x.png

下面的部分将提供关于时间轴窗格的更多信息,以及如何配置它。The sections that follow provide more information about the timeline pane and how you configure it.

放大缩小Zoom In and Out

如果你已经俘获了大量的跟踪数据,你可以扩大或缩小在时间线面板的详细介绍,让您专注于特定的数据集(参见图11-2)。If you’ve captured a lot of data with a trace, you can expand or contract the detail presented in the timeline pane, allowing you to focus in on a specific subset of data (see Figure 11-2).

Figure 11-2缩放到跟踪文档的时间线窗格中。Zooming into the timeline pane of a trace documentimage: ../Art/instruments_trace_document_timeline_pane_zooming_2x.png

放大和缩小数据To zoom in and out of your data

做以下其中之一:Do one of the following:

  • 要放大或缩小,捏的触控板。To zoom in or out, pinch the trackpad.

  • 若要放大或缩小,请使用滚动轮,同时按下位于轨道视图上的指针按下选项键。To zoom in or out, use the scroll wheel while pressing the Option key with the pointer positioned over the track view.

  • 若要放大,请按选项键,并拖动希望隔离的数据部分。To zoom in, press the Option key, and drag across the section of data you wish to isolate.

  • 若要缩小,请按下控制键,并拖动一段数据。To zoom out, press the Control key, and drag across a section of data.

使所有记录的数据符合时间线To fit all recorded data in the timeline
  1. Choose View > Snap Track To Fit (or press Control-Command-Z).

    image: ../Art/instruments_view_menu_snaptracktofit_menuitem_2x.png

增加时间轴中显示的数据的大小。To increase the size of the data displayed in the timeline
  1. Choose View > Increase Deck Size (or press Command-Plus Sign).

    image: ../Art/instruments_trace_document_timeline_pane_largertrack_2x.png

    当前选择的仪器的轨道高度增加,允许您更详细地查看它。The track for the currently selected instrument increases in height, allowing you to view it in greater detail.

    image: ../Art/instruments_view_menu_increasedecksize_menuitem_2x.png

减少时间轴中显示的数据的大小。To decrease the size of the data displayed in the timeline
  1. Choose View > Decrease Deck Size (or press Command-Minus Sign).

    image: ../Art/instruments_view_menu_decreasedecksize_menuitem_2x.png

    The track for the currently selected instrument decreases in height.

Filter a Range of Data

仪器收集大量的信息,因为它的配置文件。您可以通过设置“详细信息”窗格来快速过滤此数据,以便只显示在特定时间范围内发生的事件。见图11-3。Instruments collects massive amounts of information as it profiles. You can quickly filter this data by setting the detail pane to show only events that occurred within a specific time range. See Figure 11-3.

Figure 11-3Selecting a range of data in the timeline pane of a trace documentimage: ../Art/instruments_trace_document_timeline_pane_selectedrange_2x.png

选择检查的时间范围To select a time range for inspection
  1. 在不使用任何修饰符键的情况下拖动一段数据。只显示您拖动的数据。Drag across a section of data without using any modifier keys. Only the data you drag across is displayed.

    image: ../Art/instruments_trace_document_timeline_pane_selectingrange_2x.png

仪表突出显示时间线窗格的内容,该窗格位于指定的范围内。Instruments highlights the contents of the timeline pane that fall within the range you specified.

清除检查范围To clear an inspection range

Do one of the following:

  • Click outside the selected range in the timeline pane.

  • Choose View > Clear Inspection Range.

    image: ../Art/instruments_clearinspectionrange_menu_2x.png

Set Flags

标志允许你快速访问在时间线面板的兴趣点(参见图11-4)。可以向每个标志添加名称和说明。Flags allow you to quickly access points of interest in the timeline pane (see Figure 11-4). You can add a name and description to each flag.

Figure 11-4Flags in the timeline pane of a trace documentimage: ../Art/instruments_trace_document_timeline_pane_flags_2x.png

设置一个标记在时间轴面板当前播放头位置To set a flag at the current playhead position in the timeline pane
  1. Choose Edit > Add Flag (or press Command-Down Arrow).

    image: ../Art/instruments_addflag_menu_2x.png

在时间线标志之间导航To navigate between your timeline flags
  1. Choose Window > Manage Flags (or press Shift-Command-T) to display the Flags palette.

    image: ../Art/instruments_manageflags_menu_2x.png
  2. 单击标志面板中的一个标志,在时间轴窗格中导航到它。Click a flag in the Flags palette to navigate to it in the timeline pane.

To delete a flag
  1. Drag the flag out of the timeline navigation bar.

To hide a flag
  1. Choose Window > Manage Flags (or press Shift-Command-T) to display the Flags palette.

    image: ../Art/instruments_manageflags_menu_2x.png
  2. Deselect the checkbox next to a flag in the Flags palette to hide it in the timeline pane.

    image: ../Art/instruments_flags_palette_disabledflag_2x.png

多次运行访问跟踪数据Access Trace Data for Multiple Runs

跟踪文件可以记录数据在你的应用程序运行多个,如图11-5所示。这样做时,它不会丢弃先前记录的数据。A trace document can record data over multiple runs of your app, as shown in Figure 11-5. When doing so, it doesn’t discard previously recorded data.

Figure 11-5在跟踪文档的时间线窗格中查看多个运行Viewing multiple runs in the timeline pane of a trace documentimage: ../Art/instruments_strategy_pane_multipleruns_2x.png

查看选定工具的运行列表To view a list of runs for a selected instrument
  1. 单击策略窗格中工具左侧的“披露三角形”。Click the disclosure triangle to the left of the instrument in the strategy pane.

    image: ../Art/instruments_strategy_pane_disclosure_triangle_2x.png

    该工具展开显示一个运行列表。The instrument expands to display a list of runs.

查看选定工具的运行数据To view the run data for a selected instrument
  1. 单击策略窗格中工具左侧的“披露三角形”。Click the disclosure triangle to the left of the instrument in the strategy pane.

  2. 在时间线窗格中选择所需的运行轨迹。Select the desired run’s track in the timeline pane.

移动到所选仪器的下一个运行To move to the next run for the selected instrument
  1. Choose Instrument > Next Run, or press Command-Single Quotation Mark (').

    image: ../Art/instruments_nextrun_menu_2x.png

移动到选定工具的前一个运行To move to the previous run for the selected instrument
  1. Choose Instrument > Previous Run, or press Command-Quotation Mark (").

    image: ../Art/instruments_previousrun_menu_2x.png

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

内容概要:本文系统介绍了算术优化算法(AOA)的基本原理、核心思想及Python实现方法,并通过图像分割的实际案例展示了其应用价值。AOA是一种基于种群的元启发式算法,其核心思想来源于四则运算,利用乘除运算进行全局勘探,加减运算进行局部开发,通过数学优化器加速函数(MOA)和数学优化概率(MOP)动态控制搜索过程,在全局探索与局部开发之间实现平衡。文章详细解析了算法的初始化、勘探与开发阶段的更新策略,并提供了完整的Python代码实现,结合Rastrigin函数进行测试验证。进一步地,以Flask框架搭建前后端分离系统,将AOA应用于图像分割任务,展示了其在实际工程中的可行性与高效性。最后,通过收敛速度、寻优精度等指标评估算法性能,并提出自适应参数调整、模型优化和并行计算等改进策略。; 适合人群:具备一定Python编程基础和优化算法基础知识的高校学生、科研人员及工程技术人员,尤其适合从事人工智能、图像处理、智能优化等领域的从业者;; 使用场景及目标:①理解元启发式算法的设计思想与实现机制;②掌握AOA在函数优化、图像分割等实际问题中的建模与求解方法;③学习如何将优化算法集成到Web系统中实现工程化应用;④为算法性能评估与改进提供实践参考; 阅读建议:建议读者结合代码逐行调试,深入理解算法流程中MOA与MOP的作用机制,尝试在不同测试函数上运行算法以观察性能差异,并可进一步扩展图像分割模块,引入更复杂的预处理或后处理技术以提升分割效果。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值