วันพุธที่ 9 พฤษภาคม พ.ศ. 2555

Frame Rate Counters in Windows Phone Emulator

Frame Rate Counters in Windows Phone Emulator

When you run an application in Windows Phone Emulator, you can use the frame rate counters to monitor the performance of your application. The following illustration shows the frame rate counters.
Frame Rate Counters with Labels
You can enable or disable the frame rate counters in your code. When you create a Windows Phone application project in Visual Studio, the code to enable and disable the frame rate counters is added by default. You can find the code in the file App.xaml.cs. The code looks like the following.
// 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…
}

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;
    

To disable the frame rate counters

  • Comment out the EnableFrameRateCounter code as shown in the following code.
    // 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;
    
The following table describes each frame rate counter. For information about the lower, recommended, and upper threshold values for individual frame rate counters, see the section “Identifying Performance Issues for Graphics-Intensive Applications” in the topic Performance Considerations in Applications for Windows Phone.
Frame rate counterDescription
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 UsageThe video memory and system memory copies of textures being used in the application.
Surface CounterThe number of explicit surfaces being passed to the GPU for processing.
Intermediate Surface CounterThe number of implicit surfaces generated as a result of cached surfaces.
Screen Fill Rate CounterThe number of pixels being painted per frame in terms of screens. A value of 1 represents 480 x 800 pixels.

ไม่มีความคิดเห็น:

แสดงความคิดเห็น