Share via


How to: Monitor Performance at Run Time

The XNA Framework Remote Performance Monitor for Xbox 360 is a performance analysis tool included with the XNA Framework.

This tool provides a user interface that lets you view performance data on the fly. When you start your application from Remote Performance Monitor, the tool will read statistical data for the XNA Framework performance counters directly from the common language runtime (CLR).

You can also view XNA Framework performance counters using the Windows desktop tool, PerfMon.exe. Using Remote Performance Monitor in combination with PerfMon.exe gives you a live, graphical view of the performance counter data generated by the CLR.

With the Remote Performance Monitor you can:

  • View performance counter data while an application is running
  • View performance counter data in a graphical format in PerfMon.exe while an application is running
  • View .stat files

For a list of the available performance counters, see Performance Counters in the XNA Framework.

Using XNA Framework Remote Performance Monitor for Xbox 360

Note

Before using Remote Performance Monitor, your Xbox 360 console must be configured to communicate with XNA Game Studio Express on your desktop computer. See Configuring XNA Game Studio Express and Your Xbox 360 Console.

To run an application from Remote Performance Monitor

  1. On the Xbox 360 console, start XNA Game Launcher and then select Connect to PC.

  2. On your desktop computer, start All Programs | Microsoft XNA Game Studio Express | Tools | XNA Framework Remote Performance Monitor for Xbox 360.

  3. In the Device list box, select the Xbox 360 console to which you are connected.

  4. In the Application text box, enter the application's title. The title is set in Project | Properties | Application | Assembly Information | Title, and is the game's name as displayed in the XNA Game Launcher.

  5. In the Arguments text box, enter any command-line arguments for the application.

  6. Verify that the application is not running on the device.

  7. Click Launch.

    Remote Performance Monitor starts the application and displays performance data.

To use PerfMon.exe with Remote Performance Monitor

  1. Start an application from Remote Performance Monitor.

  2. Start PerfMon.exe.

    This file is located in \Windows\System32.

  3. On the Options menu, click Publish to Perfmon.

  4. Select the category of counter that you want to graph in PerfMon.exe.

    The category names correspond to the categories that appear when you view statistical data in Remote Performance Monitor. For example, the GC counters are named "XNA GC" in PerfMon.exe.

  5. Click Add.

To save performance data

  1. Start an application from Remote Performance Monitor.

  2. Start PerfMon.exe, and then graph performance data.

  3. On the File menu, click Save.

  4. Type a name for the file, and specify the folder in which to save the file.

    The file will be saved with a .stat extension. You can use Remote Performance Monitor to open and view generated .stat files.

See Also

Concepts

Performance Counters in the XNA Framework
Configuring XNA Game Studio Express and Your Xbox 360 Console