Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you enable FPS monitoring for testing XAML animations?

Since Windows Store Apps can run across both the Intel and the ARM architectures, it is important that animations (at least) be as performant as possible. To test animations, FPS is very important. How do you enable FPS monitoring in Windows?

like image 854
Jerry Nixon Avatar asked Feb 21 '13 07:02

Jerry Nixon


1 Answers

In Windows 8 you do this:

App.Current.DebugSettings.EnableFrameRateCounter = true;

I like to do it like this:

App.Current.DebugSettings.EnableFrameRateCounter 
    = System.Diagnostics.Debugger.IsAttached;

The counter UI is documented here (http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.debugsettings.enableframeratecounter.aspx).

Monitor includes:

  • Cp fps: the frames-per-second frame rate for the composition thread
  • UI fps: the frames-per-second 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)
  • Cp cpu: time in milliseconds spent on the composition thread's processor
  • UI cpu: time in milliseconds spent on the UI thread's processor
like image 121
Jerry Nixon Avatar answered Oct 03 '22 20:10

Jerry Nixon