0Pricing
Swift Academy · Lesson

Instruments Basics: Time Profiler

Recording CPU usage, reading call trees and finding hot spots in your code.

Why Instruments?

Xcode Instruments is a performance analysis suite. Time Profiler shows you where CPU time is being spent so you can find hot spots.

// Launch: Xcode → Product → Profile (Cmd+I)
// Choose "Time Profiler" template
// Run your app and exercise the slow path

Recording a Trace

Click the record button in Instruments, exercise the feature you want to profile, then stop recording.

// 1. Connect device or use simulator
// 2. Launch with Profile (Cmd+I)
// 3. Select Time Profiler
// 4. Record for 5-30 seconds
// 5. Stop and analyze

All lessons in this course

  1. Instruments Basics: Time Profiler
  2. Allocations and Leaks Instruments
  3. Main Thread Checker and Hangs
  4. Optimising Hot Paths: COW, Inlining and Specialisation
← Back to Swift Academy