The Time Profiler - Practical Instruments with iOS 10 - raywenderlich.com

  Переглядів 22,904

Kodeco

Kodeco

7 років тому

This video will give you an overview of the various instruments provided by Xcode to debug your app.
Course is found here: videos.raywenderlich.com/cour...
---
About www.raywenderlich.com:
raywenderlich.com is a website focused on developing high-quality programming tutorials. Our goal is to take the coolest and most challenging topics and make them easy for everyone to learn - so we can all make amazing apps.
We are also focused on developing a strong community. Our goal is to help each other reach our dreams through friendship and cooperation. As you can see below, a bunch of us have joined forces to make this happen: authors, editors, subject matter experts, app reviewers, and most importantly our amazing readers!
----
Instruments is a powerful and flexible performance analysis and testing tool that’s part of the Xcode toolset. It’s designed to help you profile your OS X and iOS apps, processes, and devices in order to better understand and optimize their behavior and performance. Incorporating Instruments into your workflow from the beginning of the app development process can save you time later by helping you find issues early in the development cycle.
In Instruments, you use specialized tools, known as instruments, to trace different aspects of your apps, processes, and devices over time. Instruments collect data as it profiles, and presents the results to you in detail for analysis.
Unlike other performance and debugging tools, Instruments allows you to gather widely disparate types of data and view them side by side. This makes it easier to identify trends that might otherwise be overlooked. For example, your app may exhibit large memory growth caused by multiple open network connections. By using the Allocations and Connections instruments together, you can identify connections that are not closing and thus result in rapid memory growth.
By using Instruments effectively, you can:
✓ Examine the behavior of one or more apps or processes
✓ Examine device-specific features, such as Wi-Fi and Bluetooth
✓ Perform profiling in a simulator or on a physical device
✓ Create custom DTrace instruments to analyze aspects of system and app behavior
✓ Track down problems in your source code
✓ Conduct performance analysis on your app
✓ Find memory problems in your app, such as leaks, abandoned memory, and zombies
✓ Identify ways to optimize your app for greater power efficiency
✓ Perform general system-level troubleshooting
✓ Save instrument configurations as templates
Although it’s embedded within and may be used with Xcode, Instruments is a separate app, which may be used independently as needed.
Instruments may seem like a complex app. It is, in that it can be used to gather all kinds of useful information about your app, and help you diagnose and resolve problems. However, the overall instrument workflow is relatively simple (see Figure 2-1).
At a high level, it consists of the following main phases:
1. Set up a trace document containing the desired instruments and settings.
2. Target a device and an app to profile.
3. Profile the app.
4. Analyze the data captured during profiling.
5. Fix any problems in your source code.
Know When to Use Instruments
While testing your app with Xcode, consult the debug navigator gauges (Figure 2-2) before diving into Instruments. These gauges provide high-level information about your app’s CPU, memory, energy usage, and more. Often, they provide all the information you need to improve performance and resolve common problems quickly. Use Instruments when you need to perform more detailed analysis.
To help you find the information you need quickly, this document is organized into parts that focus on specific aspects of Instruments.
• The first main part focuses on using the Instruments app. It covers things like creating a document, finding an instrument to do what you need, profiling an app, analyzing data, and more. Go here to find out how to do general tasks.
• Later parts cover more specialized tasks, such as boosting performance, resolving memory problems, and improving battery life.
• The final parts provide a reference guide for individual instruments and templates, as well as additional resources and reference material.
Before using Instruments, you should have a solid understanding of how Xcode works (see Xcode Overview), as well as key app development concepts, such as building and running an app, and provisioning a device.
You should also be familiar with core concepts for the type of profiling you want to perform. For example, if you’re checking your app for memory problems, then you should know a little about memory management and potential memory problems, such as leaks and zombies. If you’re checking your app for performance problems, you should know about CPU and thread utilization.

КОМЕНТАРІ: 18
@luciddraem7278
@luciddraem7278 2 роки тому
The instructor was awesome. I literally subscribe the paid plan for him. It’s sad when we don’t have new tutorials from him after he joined Apple.
@Endar92
@Endar92 7 років тому
Interesting. I'am 100% sure that I'am going to try this tool. Thank you!
@duanetucker2731
@duanetucker2731 5 років тому
Thank you so much for this video. I'm a beginner app developer and am struggling with proper methods to debug apps, and this video has helped tremendously with my understanding of the Instrumentation tool.
@abvijaykumar
@abvijaykumar 6 років тому
This is a great series..where is Part 2? I am not able to find it. Please post Part 2. Thank You
@andreagualandris2462
@andreagualandris2462 3 роки тому
This is crazy well presented and useful, thank you!
@renju252
@renju252 3 роки тому
Thank you very much. I got to the bottom a major issue caused by a filthy UI drawing through a CADisplayLink.
@SourovDattacse
@SourovDattacse 5 років тому
This is advance level and definitely hidden smart informative tutorial
@KodecoDev
@KodecoDev 5 років тому
Thanks!
@funkyflood1093
@funkyflood1093 5 років тому
Great video but 2 remarks: 1- In this series of videos, I couldn't find the Part2... 2- When Luke selects Hide System Libraries (at 9:20), the names of the methods are displayed in the Symbol Name column. When I do that, I have a bunch of 0x00whatever memory addresses. I'd like to know how to switch to method names...
@KodecoDev
@KodecoDev 5 років тому
You may be using a different version of Xcode. Feel free to head over to the raywenderlich.com forums and leave a comment on the video and the instructor will be able to assist. Thanks!
Practical Instruments with iOS 10 - raywenderlich.com
4:16
Kodeco
Переглядів 8 тис.
Apple Debugging L9 - Instruments Time Profiler
26:54
AppleProgramming
Переглядів 14 тис.
McDonald’s MCNUGGET PURSE?! #shorts
00:11
Lauren Godwin
Переглядів 29 млн
Retain Cycles: How to Detect with Instruments Profiler!
13:55
Lets Build That App
Переглядів 47 тис.
Memory Leaks in iOS: Find, Diagnose, & Fix (2022)
12:44
iOS Academy
Переглядів 44 тис.
Memory 2 - Finding and Fixing Memory Leaks (iOS, Xcode 9, Swift 4)
34:31
Mark Moeykens
Переглядів 49 тис.
Apple Debugging L5 - Memory Graph
18:01
AppleProgramming
Переглядів 13 тис.
Here's the ULTIMATE tip to find memory leaks in Xcode!
5:41
Vincent Pradeilles
Переглядів 12 тис.