Code Profiling - Instrumentation

Instrumentation is a post-build operation that takes your software and inserts probes into it. Figure 2 illustrates the MSIL for a .NET method before it has been instrumented. Figure 3 illustrates the MSIL for a .NET method after it has been instrumented; the MSIL shows the probes that were added by Visual Studio Team System. The probes that inserted are very small and are designed to minimize the performance impact to your software.

As your software executes, the probes themselves execute and the data that they emit is gathered by Visual Studio Team System. When your application stops executing, the collected data is processed and displayed in several intuitive views for your investigation.

Figure 1 - Investigating with Instrumentation

 

Figure 2 - MSIL for a non-instrumented .NET method

 

Figure 3 - MSIL for an instrumented .NET method