How to: View SQL Trace Data from a Load Test Run

You can collect SQL trace data during a load test run to analyze later. Collecting trace data lets you identify the slowest running queries and stored procedures in the SQL Server database being tested. For more information, see About SQL Tracing.

You enable tracing by editing your load test in the Load Test Editor after you create it. For more information, see How to: Integrate SQL Trace Data.

If SQL tracing is enabled, a file is created during the load test run that contains the trace data. This data is automatically saved in the Load Test Results Store at the end of the test run and the trace file is deleted. You analyze the trace data in the SQL Trace table after your load test has completed.

Viewing SQL Trace Data

To view SQL Trace Data

  1. In the load test analyzer, click Tables on the toolbar to make sure that the table grid is displayed.

  2. In the Table drop-down list box, select SQL Trace.

  3. The trace data that was collected during the run is displayed in the grid. The table lists the slowest running SQL operations sorted by duration, with the slowest at the top. Typically, the Duration column is the first column to examine. The data is displayed in milliseconds.

    The columns displayed are as follows:

    • Event Class

    • Duration

    • CPU

    • Reads

    • Writes

    • TextData

    • StartTime

    • EndTime

    Note

    If you want to trace SQL events other than the data identified in these columns, you can set up your own custom SQL tracing using the SQL Profiler, a tool that is separate from Visual Studio Team System Test Edition.

See Also

Concepts

Working with Load Test Tables

Other Resources

Analyzing Load Test Runs

Load Test Results Repository