Community研究&データ分析github.com

steipete/native-app-performance

ネイティブアプリのパフォーマンス:xctrace、Time Profiler、トレース、ホットスポット。

native-app-performance とは?

このスキルは、Instruments を起動せずに、コマンドラインからネイティブアプリのパフォーマンスをプロファイリングする方法を提供します。`xctrace` を使用して Time Profiler の記録、サンプル抽出、シンボリケーション、およびホットスポットのランキングを CLI のみで実行できます。特に macOS/iOS アプリの開発者向けで、Xcode の Instruments アプリを開かずに迅速なパフォーマンス分析を行いたい場合に有用です。記録、サンプル抽出、シンボリケーションのためのスクリプトが含まれており、ASLR によるアドレス変換にも対応します。

対応~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

ワークフローノート

  • 常に正しいバイナリをプロファイリングしていることを確認してください(ローカルビルドか /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.

関連スキル