Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
效能分析工具
也參考
如需瞭解更多資訊,請查閱 sampling profiler instructions 和 tracing profiler instructions。
打開 Xcode。在頂部選單欄的 Xcode 應用選單中,依次選擇 Open Developer Tool - Instruments :
在 Instruments 視窗中雙擊 Time Profiler:
在‘時間分析器(Time Profiler)’視窗中,點擊 Target (目標) 選單,選擇 Choose target... (選擇目標...),然後在彈出的新視窗中指定 Godot 程式的路徑、命令行參數以及環境變數。
你也可以從 Target 選單將 Time Profiler 附加到正在執行的程序。
點選 Start an immediate mode recording 按鈕開始效能分析。
在編輯器或專案中執行要分析的操作,完成後點選 Stop 按鈕。
等待結果顯示。
在視窗底部會看到所有已啟動 CPU 執行緒的呼叫樹,以及 Heaviest Stack Trace 概覽。
在(視窗底部的) 呼叫樹 (Call Tree)選單中,勾選 隱藏系統庫 (Hide system libraries),以移除外部模組。
你可以利用視窗上方的時間軸,檢視特定時間區間的詳細資訊。