Share via


Frame rate counters in the emulator for Windows Phone 8

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

When you run an app in Windows Phone Emulator, you can use the frame rate counters to monitor the performance of your app. The following illustration shows the frame rate counters.

This topic contains the following sections.

Frame rate counter descriptions

The following table describes each frame rate counter. For information about the recommended ranges of values for individual frame rate counters, see the section “Identifying Performance Issues for Graphics-Intensive Applications” in the topic App performance considerations for Windows Phone 8.

Frame rate counter

Description

Composition (Render) Thread Frame Rate (FPS)

The rate at which the screen is updated.

User Interface Thread Frame Rate (FPS)

The rate at which the UI thread is running.

Texture Memory Usage

The video memory and system memory copies of textures being used in the app.

Surface Counter

The number of explicit surfaces being passed to the GPU for processing.

Intermediate Surface Counter

The number of implicit surfaces generated as a result of cached surfaces.

Screen Fill Rate Counter

The number of pixels being painted per frame in terms of screens. A value of 1 represents the number of pixels in the current screen resolution – for example, 480 x 800 pixels.

Enabling and disabling the frame rate counters

You can enable or disable the display of the frame rate counters in your code. When you create a Windows Phone app project in Visual Studio, the following code to enable the frame rate counters is added by default in the file App.xaml.cs.

// Show graphics profiling information while debugging.
if (System.Diagnostics.Debugger.IsAttached)
{
    // Display the current frame rate counters.
    Application.Current.Host.Settings.EnableFrameRateCounter = true;

    // other code…
}
' Show graphics profiling information while debugging.
If System.Diagnostics.Debugger.IsAttached Then

    ' Display the current frame rate counters.
    Application.Current.Host.Settings.EnableFrameRateCounter = True

    ' other code...
End If

To disable the frame rate counters

  • Comment out the line of code that enables the frame rate counters as shown in the following code.

    // Display the current frame rate counters.
    //Application.Current.Host.Settings.EnableFrameRateCounter = true;
    
    ' Display the current frame rate counters.
    'Application.Current.Host.Settings.EnableFrameRateCounter = True
    

    or

  • Set EnableFrameRateCounter to false as shown in the following code.

    // Do not display the current frame rate counters.
    Application.Current.Host.Settings.EnableFrameRateCounter = false;
    
    ' Display the current frame rate counters.
    Application.Current.Host.Settings.EnableFrameRateCounter = false
    

To enable the frame rate counters

  • Set EnableFrameRateCounter to true as shown in the following code.

    // Display the current frame rate counters.
    Application.Current.Host.Settings.EnableFrameRateCounter = true;
    
    ' Display the current frame rate counters.
    Application.Current.Host.Settings.EnableFrameRateCounter = True
    

See Also

Other Resources

Frame rate counters in Windows Phone