DebugSettings.EnableFrameRateCounter property

Applies to Windows and Windows Phone

Gets or sets a value that indicates whether to display frame-rate and per-frame CPU usage info. These display as an overlay of counters in the window chrome while the app runs.

Syntax

Public Property EnableFrameRateCounter As Boolean

Property value

Type: System.Boolean [.NET] | Platform::Boolean [C++]

true to display the overlay debug counters; otherwise, false.

Remarks

The overlay debug counters have two sets of numbers. The set that appears on the upper left of the screen applies to just your app. The set that appears on the upper right applies to the system overall, and is also accounting for other apps that are drawing to the composited desktop. The right-side counter comes from the Microsoft DirectComposition components that are handling compositing for Microsoft Windows in general. Basically, if you set EnableFrameRateCounter to true, this also calls IDCompositionDeviceDebug::EnableDebugCounters in the underlying components. The result is that both the counters specific to apps using XAML and the DirectComposition counters for all apps appear when you debug your Windows Store app.

The format for the frame-rate counter displayed in the window chrome is:

000000000000
App fpsApp CPUSys fpsSys CPU

 

  • App fps: The app's UI thread frame rate, in frames per second.
  • App CPU: The CPU usage of the app's UI thread per frame, in milliseconds.
  • Sys fps: The system-wide composition engine frame rate, in frames per second. This is typically pegged to 60.
  • Sys CPU: The system-wide overall CPU usage of the composition thread per frame, in milliseconds.

The App fps value is specifically reporting on the UI thread. There could be a much higher apparent refresh rate happening in your app that's related to the composition thread, but not to the UI thread. For more info on what each thread is responsible for, see Performance best practices for Windows Store apps.

OnLaunched is a good place to change DebugSettings values. Another possibility is the App() constructor.

Windows 8 behavior

In Windows 8, the counters used a different format and didn't incorporate the DirectComposition counters. That format was:

000000000000000000000
Comp fpsUI fpsMemoryBatchComp msUI ms

 

  • Comp fps: the frame rate for the composition thread
  • UI fps: the frame rate for the UI thread
  • Memory: memory utilization for textures
  • Batch: the count of surfaces that are sent to the graphics processing unit (GPU)
  • Comp ms: time in milliseconds per frame spent on the composition thread
  • UI ms: time in milliseconds per frame spent on the UI thread

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

DebugSettings
Performance best practices for Windows Store apps

 

 

Show:
© 2014 Microsoft