native-app-performance

Record and analyze native app performance using xctrace and Time Profiler.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/Khang5687/agent-scripts --skill native-app-performance-khang5687
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-app-performance
Source: https://github.com/Khang5687/agent-scripts/tree/main/skills/native-app-performance
Command: npx skills add https://github.com/Khang5687/agent-scripts --skill native-app-performance-khang5687

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires xcrun, and includes scripts (resource) components.

What problem does it solve?

This Skill simplifies the process of recording and analyzing native app performance using xctrace and Time Profiler, allowing you to identify and address performance bottlenecks without opening Instruments.

Core Features & Use Cases

  • Performance Recording: Record Time Profiler via xctrace for a specified duration.
  • Sample Extraction: Extract time samples from the recorded trace.
  • Symbolication and Hotspots: Symbolicate the samples and rank hotspots.
  • Use Case: Ideal for developers looking to quickly identify performance issues in their native applications without the overhead of using Instruments.

Quick Start

Record performance data for the native app and extract time samples with the following command:

xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --attach <pid>
scripts/extract_time_samples.py --trace /tmp/App.trace --output /tmp/time-sample.xml

Frequently Asked Questions about native-app-performance

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

FAQPage Schema
How do I analyze native app performance bottlenecks without opening Instruments?

To analyze native app performance bottlenecks without Instruments, record Time Profiler traces via xctrace, then extract and symbolicate samples using a script to rank hotspots. This command-line workflow identifies performance issues directly from your terminal.

How do I record and extract Time Profiler samples using xctrace?

To record and extract Time Profiler samples, run `xcrun xctrace record` with the Time Profiler template and a time limit, then execute `scripts/extract_time_samples.py` on the generated trace file to output ranked hotspot data.

Can I detect performance hotspots in a running native app from the command line?

Yes, you can detect performance hotspots by attaching xctrace to a running process ID. The recorded trace is processed by a Python script to symbolicate samples and rank the most time-consuming functions.

Do I need xcrun to perform xctrace hotspot detection?

Yes, xcrun is required to invoke xctrace for recording Time Profiler traces. The entire performance analysis workflow depends on xcrun to capture trace data and a script to extract time samples.

What is the best way to identify performance hotspots without Instruments overhead?

The best way to identify hotspots without Instruments overhead is using xctrace to record Time Profiler data, then processing the trace with extract_time_samples.py to symbolicate and rank bottlenecks directly from the command line.