Export (0) Print
Expand All

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 at application run time. 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 garbage collector heap dumps. For more information, see How To: Generate a Garbage Collector Heap Dump .
  • 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

Bb198208.note(en-US,XNAGameStudio.20).gifNote
Before using Remote Performance Monitor, your Xbox 360 console must be configured to communicate with XNA Game Studio on your desktop computer. See Configuring XNA Game Studio and Your Xbox 360 Console.

To run an application from Remote Performance Monitor

  1. On the Xbox 360 console, start XNA Game Studio Connect and then select Launch.
  2. On your desktop computer, start All Programs | Microsoft XNA Game Studio 2.0 | Tools | XNA Framework Remote Performance Monitor for Xbox 360.
  3. Click the Launch Application icon (the green arrow on the toolbar).
  4. In the Device list, click the Xbox device to which you are connected.
  5. Optionally, in the Deploy Application From text box, enter the path to the directory on your desktop computer that contains the application.

    You can leave this blank if the application has already been deployed.

  6. In the Application text box, enter the game's name. The name is set in Project | Properties | Application | Assembly Information | Title, and is the game's name as displayed in XNA Game Studio Connect.
  7. In the Arguments text box, enter any command-line arguments for the application.
  8. Verify that the application is not currently running on the device.
  9. Click OK.

    Remote Performance Monitor starts the application and displays performance data.

To use PerfMon.exe with Remote Performance Monitor

  1. On your desktop computer, start All Programs | Microsoft XNA Game Studio 2.0 | Tools | XNA Framework Remote Performance Monitor for Xbox 360.
  2. On the Options menu, click Publish to Perfmon.
  3. Start an application from Remote Performance Monitor.
  4. Start PerfMon.exe.

    This file is located in \Windows\System32.

  5. In the left pane of PerfMon.exe, click System Monitor if it is not already selected.
  6. Right-click in the right pane of PerfMon.exe, and then click Add Counters.
  7. In the Performance Object drop-down, 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 garbage collection counters are named "Xbox 360 GC" in PerfMon.exe.

  8. 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.

Community Additions

ADD
Show:
© 2014 Microsoft