Xcode仪器跟踪比较 [英] Xcode Instruments trace comparison

查看:165
本文介绍了Xcode仪器跟踪比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法比较用仪器保存的跟踪文件。我如何可以比较任何方式关于连续实现应用程序的构建。

Is there any way to compare trace files saved with Instruments. How can I have a comparison of any way regarding consecutive realise builds of the app.

Lest说我发布iPhone应用程序版本1.0,然后在2个月1.1。

Lest's say I release iPhone app version 1.0 then in 2 months 1.1. What's is the best have to have a profiling comparison in terms of memory and time?

推荐答案

您可以保存跟踪文件。但是要在今后某个日期解释这些结果是合理的,在跟踪中插入flags以标记重要事件是有用的,以便您可以知道应用程序在跟踪中的显着点处做了什么。

You can save trace files. But to make is reasonable to interpret those results at a future date, it's useful to insert "flags" in your trace, to mark significant events, so that you can tell what the app was doing at notable points in the trace.

在过去,我建议包含以编程方式插入的标志,因此您将来有一些比较基础,但这在iOS7中已经打破了。但是如果你在模拟器上运行7.0之前的iOS版本,你可以:

In the past, I'd suggest the inclusion of flags inserted programmatically, so you have some basis for comparison in the future, but this is broken in iOS7. But if you're running this on the simulator with iOS prior to 7.0, you can:


  • 添加 DTPerformanceSession.framework 到您的专案;

在您的来源:

#import <DTPerformanceSession/DTSignalFlag.h>


  • 然后,在源代码中, iOS7模拟器):

  • Then, in your source, you can programmatically insert flags in Instruments (when running on pre iOS7 simulator):

    // Point flag (just an event in time)
    DTSendSignalFlag("some event", DT_POINT_SIGNAL, TRUE);
    
    // Start flag (to mark the start of something)
    DTSendSignalFlag("start some intensive process", DT_START_SIGNAL, TRUE);
    
    // End flag (to mark the end of something)
    DTSendSignalFlag("end some intensive process", DT_END_SIGNAL, TRUE);
    


  • 移除 DTPerformanceSession.framework 你的项目(添加它的过程让Xcode解析头,但你不想保留在你的iOS项目,否则你会得到链接错误)。

  • Remove DTPerformanceSession.framework from your project (the process of adding it let Xcode resolve the header, but you don't want to keep it in your iOS project or else you'll get linking errors).

    您可能希望保留相应存档的副本,以便您可以在将来某一日期重新标记跟踪文件。

    You might want to keep a copy of the respective archives so that you can resymbolicate the trace file at some future date.

    很明显,如果在iOS7中进行性能分析,您可以手动添加标记,但它不像编程方式标记那么优雅或严格。

    Obviously, if profiling in iOS7, you can add flags yourself, manually, but it's just not as elegant or rigorous as flagging programmatically.

    这篇关于Xcode仪器跟踪比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆