native-app-performance

Profile macOS/iOS apps via xctrace to record Time Profiler traces and rank hotspots.

6|1|Updated Nov 23, 2023
One-click install
npx skills add https://github.com/gmcabrita/dotfiles --skill native-app-performance-gmcabrita
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-app-performance
Source: https://github.com/gmcabrita/dotfiles/tree/main/.agents/skills/native-app-performance
Command: npx skills add https://github.com/gmcabrita/dotfiles --skill native-app-performance-gmcabrita

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Native app performance profiling for macOS/iOS is often constrained to UI-based tools; this CLI-focused approach enables recording Time Profiler traces, extracting samples, and surface hotspots without opening Instruments.

Core Features & Use Cases

  • Time Profiler recording via xctrace (attach or launch) from the command line.
  • Extract time samples and symbolicate stack traces to identify top hotspots.
  • Use cases include development, QA, and performance tuning in CI or local workflows.

Quick Start

Run a Time Profiler trace on a running or launched app and then extract, symbolicate, and review the top hotspots

Frequently Asked Questions about native-app-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I profile a native macOS or iOS app from the command line?

You can profile native macOS or iOS apps from the command line by using xctrace to record Time Profiler traces. This records time samples without requiring the Instruments UI, extracting and symbolicate stack traces to identify hotspots.

Can I identify performance hotspots without opening the Instruments UI?

Yes, you can identify performance hotspots without opening the Instruments UI by running xctrace to capture Time Profiler traces. The process extracts time samples, symbolicates addresses using atos, and ranks hotspots directly in a CLI workflow.

How do I extract and symbolicate addresses from a Time Profiler trace?

To extract and symbolicate addresses from a Time Profiler trace, use a CLI-driven workflow combining xctrace, vmmap, otool, and atos. These tools map memory addresses and rank performance hotspots without needing the Instruments graphical interface.

Does xctrace support attaching to a running app for Time Profiler recording?

Yes, xctrace supports Time Profiler recording for both attached and launched app scenarios. This allows you to capture performance data from running native macOS or iOS apps directly within local or CI workflows.

What is the best way to automate native app performance tuning in a CI workflow?

The best way to automate native app performance tuning in CI workflows is using a CLI-driven approach. It records Time Profiler traces via xctrace and ranks hotspots automatically, bypassing UI-based tools like Instruments for seamless integration.

When should I not use a CLI-driven approach for performance profiling?

You should not use a CLI-driven approach for performance profiling when you require visual timeline inspection or deep graphical interactivity. This method extracts and ranks time samples purely through text, lacking the visual analysis capabilities of the Instruments UI.