Community연구 & 데이터 분석github.com

steipete/네이티브-앱-성능

네이티브 앱 성능 분석: xctrace, Time Profiler, 트레이스, 핫스팟 식별.

네이티브-앱-성능란 무엇인가요?

이 스킬은 macOS/iOS 네이티브 애플리케이션의 성능 병목 지점을 명령줄(CLI) 환경에서 분석할 수 있도록 도와줍니다. Instruments 앱을 열지 않고도 `xctrace` 명령어로 Time Profiler 트레이스를 기록하고, 수집된 샘플을 추출하여 심볼화(symbolicate)한 후, 가장 많은 시간을 소비하는 핫스팟(hotspot) 코드를 순위별로 제안합니다. 이 스킬은 ASLR(주소 공간 레이아웃 무작위화)로 인해 변동되는 런타임 로드 주소를 `vmmap`으로 확인한 후 `atos`를 통해 심볼화하는 전 과정을 스크립트로 자동화합니다. 주요 대상 사용자는 Instruments의 GUI 없이 빠르게 성능 프로파일링을 수행하려는 개발자이며, 특히 커스텀 빌드와 배포 버전 간의 차이를 인지하고 정확한 바이너리 경로를 지정해야 합니다. 포함된 스크립트(`record_time_profiler.sh`, `extract_time_samples.py`, `top_hotspots.py`)는 기록, 추출, 심볼화 및 핫스팟 순위 산출 작업을 간편하게 실행할 수 있도록 지원합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/steipete/agent-scripts/tree/main/skills/native-app-performance

Installed? Explore more 연구 & 데이터 분석 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

네이티브 앱 성능 (CLI 전용)

목표: xctrace를 통해 Time Profiler를 기록하고, 샘플을 추출하여 심볼화한 후, Instruments를 열지 않고도 핫스팟을 제안합니다.

빠른 시작 (CLI)

  1. Time Profiler 기록 (프로세스에 연결):
# 앱을 직접 실행한 후 연결합니다
xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --attach <pid>
  1. Time Profiler 기록 (앱 실행):
xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --launch -- /path/App.app/Contents/MacOS/App
  1. 시간 샘플 추출:
scripts/extract_time_samples.py --trace /tmp/App.trace --output /tmp/time-sample.xml
  1. 심볼화를 위한 로드 주소 확인:
# 앱이 실행 중일 때
vmmap <pid> | rg -m1 "__TEXT" -n
  1. 심볼화 + 핫스팟 순위 산출:
scripts/top_hotspots.py --samples /tmp/time-sample.xml \
  --binary /path/App.app/Contents/MacOS/App \
  --load-address 0x100000000 --top 30

워크플로 참고 사항

  • 항상 올바른 바이너리를 프로파일링하고 있는지 확인하세요 (로컬 빌드 vs /Applications). --launch 사용 시에는 직접 바이너리 경로를 선호합니다.
  • 캡처 중에 느린 경로를 트리거해야 합니다 (메뉴 열기/닫기, 새로고침 등).
  • 스택이 비어 있으면 더 길게 캡처하거나 유휴 구간을 피하세요.
  • xcrun xctrace help record 및 xcrun xctrace help export 명령어로 올바른 플래그를 확인할 수 있습니다.

포함된 스크립트

  • scripts/record_time_profiler.sh: 연결 또는 실행 방식을 통해 기록합니다.
  • scripts/extract_time_samples.py: 트레이스에서 time-sample XML을 내보냅니다.
  • scripts/top_hotspots.py: 심볼화하고 상위 앱 프레임을 순위별로 정렬합니다.

문제 해결 팁

  • ASLR로 인해 vmmap에서 얻은 런타임 __TEXT 로드 주소를 사용해야 합니다.
  • 새 빌드를 사용한다면 --binary 경로를 업데이트하세요. 심볼이 트레이스와 일치해야 합니다.
  • CLI 전용 워크플로: atos를 통해 스택이 심볼화되면 Instruments를 열 필요가 없습니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

steipete/agent-transcript

GitHub PR/issue agent transcripts: redact, preview, and insert safely.

steipete/beeper

Beeper cache: contact hints, room lookup, WhatsApp/iMessage traces, FTS.

steipete/browser-use

Existing Chrome automation: Chrome plugin first, mcporter fallback.

steipete/clawsweeper-status

ClawSweeper status: URLs, workflow health, active workers, ops snapshot.

steipete/clickclack

ClickClack ops: chat app, Hetzner deploy, DNS/docs/app, Docker rollout.

steipete/cloudflare-registrar

Cloudflare Registrar: domain availability, prices, registration via mcporter.

steipete/codex-debugging

Codex debugging: codex-rs core/tui/exec/cli/app-server/config.

steipete/create-cli

CLI UX/spec: args, flags, help, output, errors, config, dry-run.

steipete/discord-clawd

Discord-backed OpenClaw agent/session relay; not archive search.

steipete/domain-dns-ops

DNS/domain ops: registrars, zones, redirects, DNS/HTTP verify, manager truth.

steipete/frontend-design

Frontend UI: pages, apps, components, polished non-generic design.

steipete/github-author-context

GitHub contributor context: identity, activity, trust, company/team signal.

steipete/github-cache-hygiene

GitHub quota/cache hygiene: gh, ghx, xcache, gitcrawl, mirrors, limits.

steipete/github-deep-review

GitHub deep review: bugs, PRs, best fix, stale-or-real, read code first.

steipete/github-project-triage

GitHub issue/PR triage: queues, CI, blockers, risk, proof, next actions.

steipete/hopper-debugger

Hopper debugging: macOS/iOS binaries, ObjC/Swift symbols, dyld, LLDB.

steipete/instruments-profiling

Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

steipete/mac-maintenance

Mac upkeep: brew update/upgrade, pull clean repos, empty Trash.

steipete/maintainer-orchestrator

Open-source maintainer orchestration: Codex app workers, work recovery, dependencies, vision, releases.

steipete/markdown-converter

Markdown conversion: PDF, Office, HTML, data, OCR, audio, ZIP, YouTube.

관련 스킬