Code Profiler - Sampling

The Heisenberg effect is the bane of all code profilers in the development tool marketplace. The act of measuring performance typically involves adding code to the software being measured. Doing this affects the performance of the software you are measuring, simply because there is more code being executed. Even when very little code is added, there is the additional processing overhead needed to keep track of your measurements.

Visual Studio Team System offers its Sampling feature as an innovative solution to this problem. Sampling works by periodically taking a ‘sample’ from an application as it executes. Unlike other sampling profilers on the market, Visual Studio Team System will sample the application itself as well as capture a call stack of the method being sampled. Samples will accumulate as the application executes; over time, what develops is a pattern where samples tend to congregate. These are indications of hotspots in your application. Once these hotspots are identified, Visual Studio Team System offers instrumentation, which is a more traditional profiling method, to gather more data about these hotspots.

Configuring Sampling Intervals