对于使用 Objective-C 和 XCode 制作的 iPhone 游戏来说,什么是好的性能分析器?
我正在使用 XCode 用 Objective-C 编写 iPhone 游戏。 我想分析我的代码的性能。 什么是好的分析器?
I'm writing an iPhone game in objective-C using XCode. I'd like to profile the performance of my code. What is a good profiler to use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
你试过鲨鱼吗? 它带有开发人员工具。
Have you tried Shark? it comes with the developer tools.
Apple 提供了一个名为 Instruments 的程序,它包含在 iPhone SDK 下载中,这确实非常出色。 它允许您查看内存泄漏、动画性能和许多其他内容。
Apple provides a program called Instruments, which is included with the iPhone SDK download, that really is excellent. It allows you to view memory leaks, animation performance, and a bunch of other stuff.
您下载的开发人员工具还包括一个名为 Instruments 的出色应用程序。 您可以在 Xcode 旁边的 Developer 文件夹中找到它:
/Developer/Applications/Instruments.app
Instruments 非常适合分析,并且还具有一些预设模式,您可以使用它们来跟踪内存泄漏、查看各种对象的实例数量 Run
要使用 Instruments,只需在 Xcode 中构建您的应用程序,然后仍在 Xcode 中,从以下位置启动 Instruments:
> 从性能工具开始> 仪器模板
...然后选择您想要执行的性能监控类型。
The developer tools you downloaded also included a great app called Instruments. You'll find it in your Developer folder next to Xcode:
/Developer/Applications/Instruments.app
Instruments works great for profiling and also has some preset modes that you can use to track down memory leaks, view how many instances of various objects have been created, monitor your OpenGL performance, etc.
To use Instruments, just build your app in Xcode, then while still in Xcode, launch Instruments from:
Run > Start With Performance Tool > Instruments Templates
…then select the type of performance monitoring you'd like to do.
Shark 是一个令人难以置信的分析器,作为 Apple CHUD 工具的一部分包含在 XCode 中。 如果您可以让它在模拟器中运行,您将对它提供的结果非常满意。
Shark is an incredible profiler, included as part of Apple's CHUD tools, with XCode. If you can get that to run in, say, the simulator, you will be extremely pleased with the results it provides.
只是想插入一组我为 iPhone 创建的分析器宏。 您可以进行传统意义上的分析,而不是使用 Shark 进行采样。 它也不需要任何特殊工具,并且输出会保存到应用程序的文档文件夹中的文件中。
http://code.google.com/p/iphone-quick-profiler/< /a>
.n
Just wanted to plug a set of profiler macros I created for iPhone. You can profile in the traditional sense vs sampling w Shark. It also doesn't require any special tools and the output is saved to a file in your app's Documents folder.
http://code.google.com/p/iphone-quick-profiler/
.n