View in English

  • Apple Developer
    • 今すぐ始める

    「今すぐ始める」を詳しく見る

    • 概要
    • 学ぶ
    • Apple Developer Program

    最新情報

    • 最新ニュース
    • Hello Developer
    • プラットフォーム

    プラットフォームを詳しく見る

    • Appleプラットフォーム
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    特集

    • デザイン
    • 配信
    • ゲーム
    • アクセサリ
    • Web
    • Home
    • CarPlay
    • テクノロジー

    テクノロジーを詳しく見る

    • 概要
    • Xcode
    • Swift
    • SwiftUI

    特集

    • アクセシビリティ
    • App Intent
    • Apple Intelligence
    • ゲーム
    • 機械学習とAI
    • セキュリティ
    • Xcode Cloud
    • コミュニティ

    コミュニティを詳しく見る

    • 概要
    • 「Appleに相談」イベント
    • コミュニティによるイベント
    • デベロッパフォーラム
    • オープンソース

    特集

    • WWDC
    • Swift Student Challenge
    • デベロッパストーリー
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Center
    • ドキュメント

    ドキュメントを詳しく見る

    • ドキュメントライブラリ
    • テクノロジー概要
    • サンプルコード
    • ヒューマンインターフェイスガイドライン
    • ビデオ

    リリースノート

    • 注目のアップデート
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • ダウンロード

    ダウンロードを詳しく見る

    • すべてのダウンロード
    • オペレーティングシステム
    • アプリ
    • デザインリソース

    特集

    • Xcode
    • TestFlight
    • フォント
    • SF Symbols
    • Icon Composer
    • サポート

    サポートを詳しく見る

    • 概要
    • ヘルプガイド
    • デベロッパフォーラム
    • フィードバックアシスタント
    • お問い合わせ

    特集

    • アカウントヘルプ
    • App Reviewガイドライン
    • App Store Connectヘルプ
    • 近日導入予定の要件
    • 契約およびガイドライン
    • システムステータス
  • クイックリンク

    • イベント
    • ニュース
    • Forum
    • サンプルコード
    • ビデオ
 

ビデオ

メニューを開く メニューを閉じる
  • コレクション
  • すべてのビデオ
  • 利用方法

その他のビデオ

  • 概要
  • Summary
  • コード
  • Metalゲームのパフォーマンス問題の検出と修正

    パワフルなMetalツールを使うと、検出が困難なゲームのパフォーマンス問題をトラッキングできます。InstrumentsのGame Performance Overviewを使って詳細なパフォーマンスデータを収集する方法、metalperftrace(macOSの場合)またはコントロールセンター(iOSの場合)でバックグラウンドトレースを実行する方法、新しいStateReporting APIでメトリックスをゲームの実行状態に直接関連付ける方法を紹介します。何時間にもわたり収集されたテレメトリを、対策につながる明確なインサイトに変換することができます。

    関連する章

    • 0:00 - Introduction
    • 1:51 - Metal performance metrics
    • 3:32 - Trace collection
    • 6:38 - Analyze performance traces
    • 10:08 - Contextualize with StateReporting
    • 17:48 - Collect field data with MetricKit
    • 19:41 - Next steps

    リソース

    • Understanding the Metal Performance HUD metrics
    • Monitoring your Metal app’s graphics performance
    • Getting started with StateReporting
    • Metal debugger
      • HDビデオ
      • SDビデオ

    関連ビデオ

    Tech Talks

    • M3とA17 Proの新しいMetalプロファイリングツール
  • このビデオを検索
    • 5:00 - Collect a trace with metalperftrace

      # Collect the last 5 hours
      metalperftrace collect /tmp --last 5h
      
      # Output
      # Metal performance traces collected to: /tmp
      # /tmp/MetalPerfTrace_20260401_094100_to_144100.atrc
      
      # Or collect an explicit time range
      metalperftrace collect /tmp \
        --start 2026-04-01T09:41:00 \
        --end 2026-04-01T12:41:00
    • 7:02 - Print a trace overview

      metalperftrace overview /Data/MyGameTrace.atrc
      
      # [Modern Renderer pid:13833]
      # Mem: 2146.1 MiB (2343.9 Peak, 1199.4 Metal)
      # Total CPU Time: 2417.601s (33.17% Sys, 66.83% User)
      # Instructions: 9944836683668 (5.75% P, 94.25% E)
      # Cycles: 5176430469224 (4.45% P, 95.55% E)
      # Disk Reads / Writes: 317.37 / 0.04 MiB (Logical Write 0.04)
      # Layer 0x729293000 (3456x2104) Interval 300.065s Active 300.065s
      #   59.7 FPS  17735 Frames  188 Skipped
      #   Frame Time avg: 16.74ms min: 8.33 max: 125.00 stddev: 3.70
      #   CPU Begin-to-Present avg: 3.99ms min: 1.40 max: 94.37 stddev: 1.80
      #   On-GPU Time avg: 13.39ms min: 5.24 max: 37.57 stddev: 1.43
      #   Next Drawable Wait avg: 0.26ms min: 0.00 max: 91.08 stddev: 1.75
      #   Shader Compilation Time: 0.000s (Total: 0, Cached: 18)
    • 7:58 - Filter by process and emit JSON

      // Report state transitions
      #import <StateReporting/StateReporting.h>
      
      NSString *domain = @"com.mygame.level";
      SRStateReporter *reporter = [SRStateReporter reporterForDomain:domain];
      
      [reporter reportTransitionToStateLabel:@"Level 1"
                              stableMetadata:nil
                            volatileMetadata:nil];
      
      [reporter reportTransitionToStateLabel:@"Level 1"
                              stableMetadata:@{ @"id": @1001 }
                            volatileMetadata:nil];
      
      [reporter reportVolatileMetadataUpdate:@{ @"health": @100 }];
    • 13:55 - Include full state transitions in overview

      metalperftrace overview /Data/MyGameTrace.atrc --include-state-transitions
      
      # [States]
      # com.mygame.graphics
      #   High (30.59%, 14.996s)  raytracing: 1  shadow: ultra
      #   Medium (69.38%, 34.012s)  raytracing: 0  shadow: medium
      # com.mygame.level
      #   Level 1 (20.47%, 10.033s)  biome: forest   id: 1001
      #   Level 2 (79.53%, 38.991s)  biome: volcano  id: 1002
    • 14:15 - Aggregate metrics by state

      # Aggregate across all domains / transitions
      metalperftrace overview /Data/MyGameTrace.atrc --aggregate
      
      # Aggregate one domain
      metalperftrace overview /Data/MyGameTrace.atrc --aggregate \
        --domain com.mygame.graphics
      
      # Aggregate a specific state label within a domain
      metalperftrace overview /Data/MyGameTrace.atrc --aggregate \
        --domain com.mygame.graphics \
        --state-label "High"
    • 0:00 - Introduction
    • Overview of the challenge of maintaining consistent frame rates in games across long play sessions, and a preview of the new tools and workflows for collecting, analyzing, and contextualizing Metal performance data.

    • 1:51 - Metal performance metrics
    • A tour of the Metal performance metrics available through tools like the Metal Performance HUD, covering FPS, GPU time, frame interval, layer sizes, composition mode, and MetalFX-related metrics.

    • 3:32 - Trace collection
    • How to collect performance traces using the Game Performance Overview template in Instruments for desk testing, and the new always-on system-level data collection on iOS and macOS that stores Metal performance metrics for days.

    • 6:38 - Analyze performance traces
    • How to analyze collected traces using the metalperftrace command-line tool on macOS — printing overviews, exporting JSON for scripting or AI agents — and how to open and visualize traces in Instruments to identify FPS drops and other anomalies.

    • 10:08 - Contextualize with StateReporting
    • Introduces the StateReporting API, which lets you describe your game's behavior and state over time using domains, states, and metadata. Learn how state transitions appear in the Metal Performance HUD, metalperftrace output, and Instruments tracks to make performance issues immediately actionable.

    • 17:48 - Collect field data with MetricKit
    • How to use MetricKit in macOS and iOS 27 to collect Metal frame rate data and other performance metrics in the field after your game ships, including per-state breakdowns using StateReporting domains.

    • 19:41 - Next steps
    • Key takeaways and recommended next steps: adopt StateReporting, try the new trace collection tools and metalperftrace CLI, and explore related Metal developer tools documentation.

Developer Footer

  • ビデオ
  • WWDC26
  • Metalゲームのパフォーマンス問題の検出と修正
  • メニューを開く メニューを閉じる
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    メニューを開く メニューを閉じる
    • アクセシビリティ
    • アクセサリ
    • Apple Intelligence
    • App Extension
    • App Store
    • オーディオとビデオ(英語)
    • 拡張現実
    • デザイン
    • 配信
    • 教育
    • フォント(英語)
    • ゲーム
    • ヘルスケアとフィットネス
    • アプリ内課金
    • ローカリゼーション
    • マップと位置情報
    • 機械学習とAI
    • オープンソース(英語)
    • セキュリティ
    • SafariとWeb(英語)
    メニューを開く メニューを閉じる
    • 英語ドキュメント(完全版)
    • 日本語ドキュメント(一部トピック)
    • チュートリアル
    • ダウンロード
    • フォーラム(英語)
    • ビデオ
    Open Menu Close Menu
    • サポートドキュメント
    • お問い合わせ
    • バグ報告
    • システム状況(英語)
    メニューを開く メニューを閉じる
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles(英語)
    • フィードバックアシスタント
    メニューを開く メニューを閉じる
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program(英語)
    • Mini Apps Partner Program
    • News Partner Program(英語)
    • Video Partner Program(英語)
    • セキュリティ報奨金プログラム(英語)
    • Security Research Device Program(英語)
    Open Menu Close Menu
    • Appleに相談
    • Apple Developer Center
    • App Store Awards(英語)
    • Apple Design Awards
    • Apple Developer Academy(英語)
    • WWDC
    最新ニュースを読む。
    Apple Developerアプリを入手する。
    Copyright © 2026 Apple Inc. All rights reserved.
    利用規約 プライバシーポリシー 契約とガイドライン