DebugSettings.EnableFrameRateCounter 屬性

定義

取得或設定值,這個值表示是否要顯示畫面播放速率和每一畫面的 CPU 使用量資訊。 當應用程式執行時,這些計數器會顯示為視窗 Chrome 中的計數器重迭。

public:
 property bool EnableFrameRateCounter { bool get(); void set(bool value); };
bool EnableFrameRateCounter();

void EnableFrameRateCounter(bool value);
public bool EnableFrameRateCounter { get; set; }
var boolean = debugSettings.enableFrameRateCounter;
debugSettings.enableFrameRateCounter = boolean;
Public Property EnableFrameRateCounter As Boolean

屬性值

Boolean

bool

true 表示顯示重迭偵錯計數器;否則為 false

備註

重迭偵錯計數器有兩組數位。 畫面左上方顯示的集合只會套用至您的應用程式。 出現在右上方的集合會整體套用至系統,也會考慮繪製至複合桌面的其他應用程式。 右側計數器來自一般處理 Microsoft Windows 撰寫的 Microsoft DirectComposition 元件。 基本上,如果您設定 EnableFrameRateCountertrue ,這也會呼叫基礎元件中的 IDCompositionDeviceDebug.EnableDebugCounters 。 結果是當您對應用程式進行偵錯時,會同時顯示所有應用程式使用 XAML 和 Microsoft DirectComposition 計數器的特定計數器。

視窗 Chrome 中顯示的畫面播放速率計數器格式如下:

應用程式 fps 應用程式 CPU Sys fps Sys CPU
000 000 000 000
應用程式的 UI 執行緒畫面播放速率,以每秒畫面為單位。 每個畫面的應用程式 UI 執行緒 CPU 使用量,以毫秒為單位。 全系統組合引擎畫面播放速率,每秒畫面格數。 這通常會套用至 60。 每個畫面的整個系統整體 CPU 使用量,以毫秒為單位。

App fps值會隨選報表 UI 執行緒。 您的應用程式中可能會發生與組合執行緒相關的明顯重新整理速率,但與 UI 執行緒無關。 如需每個執行緒負責內容的詳細資訊,請參閱 Windows 市集應用程式的效能最佳做法

OnLaunched 是變更 DebugSettings 值的好位置。 另一個可能性是建 App() 構函式。

適用於

另請參閱