본문으로 건너뛰기
Skillpedia
일반 코딩7.4k · #13237

native-app-performance

하는 일

이 스킬은 Apple의 명령줄 도구로 Time Profiler 추적을 기록한 뒤, Instruments를 열지 않고 병목 지점의 순위를 매깁니다. 네이티브 앱의 느린 동작을 쫓는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓네이티브 Mac이나 iOS 앱이 느려서 문제가 되는 코드를 찾고 싶을 때.
  • ✓앱 안이 아니라 명령줄에서 프로파일을 기록하고 싶을 때.
  • ✓추적 결과의 스택이 비어 있어서 느린 동작을 다시 기록해야 할 때.

스킬 링크

https://github.com/steipete/agent-scripts/blob/main/skills/native-app-performance/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/steipete/agent-scripts/blob/main/skills/native-app-performance/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“느린 작업을 하는 동안 앱의 성능 추적을 90초 동안 기록하고, 가장 많이 걸리는 병목 지점 목록을 보여 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 xctrace 도구로 추적을 기록하고, 시간 샘플을 추출하고, 로드 주소를 찾은 뒤, 포함된 스크립트로 가장 많이 실행되는 함수의 순위를 매깁니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Native App Performance (CLI-only)

Goal: record Time Profiler via xctrace, extract samples, symbolicate, and propose hotspots without opening Instruments.

Quick start (CLI)

  1. Record Time Profiler (attach):
# Start app yourself, then attach
xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --attach <pid>
  1. Record Time Profiler (launch):
xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --launch -- /path/App.app/Contents/MacOS/App
  1. Extract time samples:
scripts/extract_time_samples.py --trace /tmp/App.trace --output /tmp/time-sample.xml
  1. Get load address for symbolication:
# While app is running
vmmap <pid> | rg -m1 "__TEXT" -n
  1. Symbolicate + rank hotspots:
scripts/top_hotspots.py --samples /tmp/time-sample.xml \
  --binary /path/App.app/Contents/MacOS/App \
  --load-address 0x100000000 --top 30

Workflow notes

  • Always confirm you’re profiling the correct binary (local build vs /Applications). Prefer direct binary path for --launch.
  • Ensure you trigger the slow path during capture (menu open/close, refresh, etc.).
  • If stacks are empty, capture longer or avoid idle sections.
  • xcrun xctrace help record and xcrun xctrace help export show correct flags.

Included scripts

  • scripts/record_time_profiler.sh: record via attach or launch.
  • scripts/extract_time_samples.py: export time-sample XML from a trace.
  • scripts/top_hotspots.py: symbolicate and rank top app frames.

Gotchas

  • ASLR means you must use the runtime __TEXT load address from vmmap.
  • If using a new build, update the --binary path; symbols must match the trace.
  • CLI-only flow: no need to open Instruments if stacks are symbolicated via atos.
자주 묻는 질문

Instruments를 열어야 하나요?

아닙니다. 스킬은 Instruments를 열지 않고 명령줄에서 프로파일링합니다.

추적이 왜 잘못될 수 있나요?

잘못된 앱 복사본이 프로파일링될 수 있다고 스킬이 경고하므로, 정확한 바이너리 경로를 지정해야 합니다.

스택이 비어 있으면 어떻게 하나요?

더 길게 기록하거나 유휴 구간을 피하라고 스킬이 설명합니다.

상세 정보

작성자의 원본 설명

Native app performance: xctrace, Time Profiler, traces, hotspots.

repo: steipete/agent-scripts

인기도

GitHub 스타
7.4k
순위
#13237
라이선스
MIT
업데이트
2026. 10. 30.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬