Profiling Silverlight Applications - Overview

Applies to AQTime 8.81, last modified on January 18, 2022

With AQTime you can profile in-browser Silverlight applications running on a local machine or hosted on web sites. You can also profile out-of-browser applications running on your computer.

This topic provides a brief overview of profiling Silverlight applications with AQTime.

Requirements

AQTime supports profiling of Silverlight 4 applications. You cannot profile Silverlight applications compiled with an earlier version of Silverlight.

To profile Silverlight applications, you need Silverlight version 4 to be installed on your computer. If an earlier version of Silverlight is installed, AQTime will not be able profile code of Silverlight applications.

You can get the latest version of Silverlight from Microsoft’s web site:

http://www.microsoft.com/getsilverlight/get-started/install/default.aspx

Supported Profilers

To analyze Silverlight applications, you can use the following profilers:

Preparing Applications for Profiling

To profile a Silverlight application with AQTime, there is no need to prepare the application in a special way.

Some preparations are required only if you need to profile individual source lines of your Silverlight application. In this case, you need to compile the application with debug information. See How AQTime Profilers Use Metadata and Debug Information for detailed information on how to do this.

Profiling Instructions

AQTime supports Silverlight applications in the same manner it supports .NET modules. You can create areas to choose routines and classes to be profiled or profile the entire project using the All Project Modules predefined area.

You can also profile your Silverlight application code along with other CLR routines which are called by your application. For this purpose, use the Entire .NET Code area.

AQTime profilers can analyze Silverlight application code at two levels of detail: routine or line. You can profile any Silverlight application by routines. However, to profile a Silverlight application by lines, it must be compiled with debug information (see above).

In-browser Silverlight applications running on a remote server and out-of-browser applications installed from the Web cannot be profiled at the line level, since they do not include debug information. They can be profiled only by routines.

The way you prepare a profiling project for a Silverlight application depends on the way the application runs:

  • If your Silverlight application runs in a web browser and resides on your computer, then to profile it, you add the application module to the Setup panel, and in the Run Parameters dialog, specify the host HTML page and the web browser that will be used to launch the application.

    For complete information, see Profiling Local Silverlight Applications.

  • If your Silverlight application runs in a web browser and is hosted on a web site, then to profile it you add the web site’s URL to the Setup panel, and in the Run Parameters dialog, choose the web browser to be used for opening the URL.

    For complete information, see Profiling Remote Silverlight Applications.

  • If your Silverlight application runs outside the browser, then to profile it, you should add the application module to the AQTime project, and in the Run Parameters dialog, specify the path to SLLaucher.exe (C:\Program Files\Microsoft Silverlight\sllauncher.exe). SLLauncher is part of the Silverlight runtime and the tool that is used to run out-of-browser Silverlight applications. It will be used as a host application for your Silverlight module (that is, this executable will launch your application during profiling).

    For complete information, see Profiling Out-of-Browser Silverlight Applications.

To profile a Silverlight application, you need to start it under AQTime. To run the application, use the Normal run mode.

Note: Currently, AQTime cannot profile Silverlight code if you attach a profiler to a running Silverlight application.

Profiling Results

If you profile your Silverlight application with the Entire .NET Code (Routines only) area enabled, AQTime reports the results of Silverlight code profiling along with the profiling results of other CLR routines that were called from your application.

To distinguish between the results of Silverlight profiling and those of .NET code profiling, you can use the Module Name column of the Report panel. This column specifies the name of the module which contains the profiled routine. For routines of the Silverlight application, this column displays the name of the profiled application module. You can group or filter the results by this column’s value.

By default, the Module Name column is hidden, but you can add it to the panel. For information on this, see Adding and Removing Columns.

Sample Applications

AQTime includes a number of samples that you can use to get started profiling Silverlight applications.

On Windows Vista and later, AQTime samples are located in the <Users>\Public\Documents\AQTime 8 Samples folder. On other operating systems, the samples reside in the <Documents and Settings>\All Users\Documents\AQTime 8 Samples folder.
CoverageSample

Demonstrates how you can use the Coverage profiler to find untested sections of your code.

<AQTime Samples>\Silverlight\Coverage

PerformanceSample

Demonstrates how you can use the Performance profiler to time function execution in your application.

<AQTime Samples>\Silverlight\Performance

For more information on how to profile this sample, see Profiling Silverlight Applications Tutorial

See Also

Profiling Silverlight Applications
Profiling Various Applications and Code

Highlight search results