asc-performance について
asc-performanceは、App Storeアプリのパフォーマンス指標と診断ログを調べるコマンドラインスキルです。開発者がアプリまたはビルド単位の測定値を確認し、ハング、起動遅延、ディスク書き込みなどの反復する問題を追跡できます。
主な機能
- 01アプリおよびビルド単位の指標一覧
- 02起動、ハング、メモリ、ディスク、バッテリー情報
- 03ハングや起動遅延の診断シグネチャ検索
- 04ログとコールスタック要約の詳細確認
活用シーン
- 01アプリまたはビルドの性能指標の確認
- 02ハングの発生箇所とコールスタックの調査
- 03ビルド間の指標比較
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ tddworks/ asc-cli-skills --skill asc-performanceインストール後、Claude Code で/asc-performanceを入力して読み込まれたか確認します。
同梱ファイルreferences/commands.md
詳細
asc による電力とパフォーマンス
パフォーマンス指標(起動時間、ハング率、ディスク書き込み、メモリ使用量、バッテリー駆動時間、終了、アニメーションの引っかかり)を監視するため、パフォーマンスメトリクスと診断ログをダウンロードします。
認証
asc auth login --key-id <id> --issuer-id <id> --private-key-path ~/.asc/AuthKey.p8
操作方法(CAEOAS のアフォーダンス)
すべての JSON レスポンスには、すぐに実行できるコマンドを含む "affordances" フィールドがあります。ID はすでに入力されています。アフォーダンスに従って、メトリクスから診断、ログへと詳細を確認します。
アプリのメトリクス → 診断 → ログの流れ:
// 1. asc perf-metrics list --app-id app-1 → shows performance overview
{
"id": "app-1-LAUNCH-launchTime",
"category": "LAUNCH",
"latestValue": 1.5,
"affordances": {
"listAppMetrics": "asc perf-metrics list --app-id app-1"
}
}
// 2. asc diagnostics list --build-id build-1 → shows hotspots
{
"id": "sig-1",
"diagnosticType": "HANGS",
"weight": 45.2,
"affordances": {
"listLogs": "asc diagnostic-logs list --signature-id sig-1",
"listSignatures": "asc diagnostics list --build-id build-1"
}
}
// 3. asc diagnostic-logs list --signature-id sig-1 → shows call stacks
{
"id": "sig-1-0-0",
"bundleId": "com.example.app",
"callStackSummary": "main > UIKit > layoutSubviews",
"affordances": {
"listLogs": "asc diagnostic-logs list --signature-id sig-1"
}
}
典型的なワークフロー
アプリのパフォーマンスをひと目で確認する
asc perf-metrics list --app-id 123456789 --pretty
特定のメトリクスの種類を調査する
# Launch time only
asc perf-metrics list --app-id 123456789 --metric-type LAUNCH --pretty
# Hang rate only
asc perf-metrics list --app-id 123456789 --metric-type HANG --pretty
ビルドごとのメトリクスを比較する
asc builds list --app-id 123456789 --output table
asc perf-metrics list --build-id build-abc --pretty
ビルド内のハングを診断する
# 1. List diagnostic signatures (hang hotspots)
asc diagnostics list --build-id build-abc --diagnostic-type HANGS --pretty
# 2. Drill into the top signature's call stacks
asc diagnostic-logs list --signature-id sig-1 --pretty
調査の全パイプライン
# Start from builds
BUILD_ID=$(asc builds list --app-id APP_ID | jq -r '.data[0].id')
# Check performance metrics
asc perf-metrics list --build-id "$BUILD_ID" --pretty
# Find hang hotspots
asc diagnostics list --build-id "$BUILD_ID" --diagnostic-type HANGS --pretty
# Get call stacks for the heaviest signature
SIG_ID=$(asc diagnostics list --build-id "$BUILD_ID" --diagnostic-type HANGS \
| jq -r '.data | sort_by(-.weight) | .[0].id')
asc diagnostic-logs list --signature-id "$SIG_ID" --pretty
パフォーマンスメトリクスのカテゴリ
| カテゴリ | --metric-type の値 | 測定内容 |
|---|---|---|
| 起動 | LAUNCH | アプリの起動時間 |
| ハング | HANG | メインスレッドのハング率 |
| メモリ | MEMORY | メモリのピーク使用量と平均使用量 |
| ディスク | DISK | ディスク書き込み量 |
| バッテリー | BATTERY | エネルギーへの影響 |
| 終了 | TERMINATION | バックグラウンド/フォアグラウンドでの終了 |
| アニメーション | ANIMATION | アニメーションの引っかかり率 |
| ストレージ | STORAGE | ストレージ使用量 |
診断の種類
| 種類 | --diagnostic-type の値 | 取得内容 |
|---|---|---|
| ハング | HANGS | メインスレッドのハングの特徴 |
| ディスク書き込み | DISK_WRITES | 過剰なディスク書き込みの特徴 |
| 起動 | LAUNCHES | 起動が遅い場合の特徴 |
結果の読み方
PerformanceMetric — メトリクス識別子(例:launchTime、peakMemory)ごとに1行を示します。ネストされた Xcode Metrics API のデータをフラット化したものです。主なフィールド:
category— メトリクスのグループ(LAUNCH、HANG など)latestValue+unit— 最新の測定値goalValue— Apple が推奨する目標値parentType—"app"または"build"(アプリレベルとビルドレベルのどちらのメトリクスかを示します)
DiagnosticSignatureInfo — weight(発生割合)で順位付けされた、繰り返し発生する問題のパターンです。weight が高いほど、影響が大きいことを示します。insightDirection が "UP" の場合、問題は悪化しています。
DiagnosticLogEntry — デバイスのメタデータと callStackSummary(上位5フレームを > で連結したもの)を含む個別のログです。
コマンドの完全なリファレンス
すべてのフラグと使用例については、commands.md を参照してください。