Agreed: there has never been a really good relationship - let's not even start talking about friendship - between Germans and Brits. Let's forget about this for a while... working together with an industry luminary like Richard Blewett is more than I could ever wish.
Luckily enough, Richard joined thinktecture this week as a high-class consultant - welcome! Working with Rich (subscribe to his blog here) is surely going to be a lot of fun.
Sorry, we have strange problems when people want to comment on our posts. If you have submitted a comment in the last few weeks and it did not show up here, feel free to contact me. Sorry again.
Yesterday I checked out the various ways in Visual Studio 2005 to do perfomance profiling of apps. In the past I was using CLR Profiler and really like it a lot - so I was a bit biased when looking at VS 2005.
Essentially there are two approaches to profiling in VS 2005: sampling and instrumentation. Let's look briefly at both (from the MSDN docs):
Sampling Sampling, in which the application is periodically interrupted, provides the advantage of low overhead, which allows the application to behave closer to how it would behave in the real world. During sampling, the performance data collection infrastructure periodically interrupts the application as it runs to determine what function is running and increments the sample count of that function. It stores information about the call stack leading up to the function call. The drawback to this approach is that it can get only relative performance data for the functions that were sampled. It is possible that a function you wanted to sample did not get sampled and therefore, no information is available about it.
Note. You must choose appropriate sampling event to be used during sampling. For example, CPU cycle sample event only shows the locations in the application that consume CPU cycles. If the application is blocked waiting for disk, network, page fault, etc. the resulting information will not be helpful in determining the actual problem. To detect problems with page faults, use page fault as the sample event.
Instrumentation Instrumentation provides the advantage of gathering exact performance data for specific sections of the application. During instrumentation, enter and exit probes are inserted into the application's functions. These probes report back to the data collection infrastructure and allow users to capture exact amounts of time and other metrics that a function took to run.
Note: Probes are not inserted in inline functions - functions compiled with /Ox (Full Optimization). Therefore, number of calls in the report will not agree with the actual number of times the code block executed. To determine the exact number of times that code block executed, compile code with /Ob0. However, compiling code using this option will impact code optimization.
OK, what I wanted to test is sampling with a very simple sample Windows Forms application. So I fired up my Virtual PC image and configured the perfomance tools inside of VS 2005.
Finally I ran the profiling.... dang!!!
What happened? It turns out that the profiling tools installs a device driver to help out with exact timing. The driver tries to set interrupts and catches them - those interrupts are not supported in the current Virtual PC version. Aha!
So hopefully the teams at Microsoft will be working together to figure out how to deal with that problem. Hm... but honestly: if you really want and need performance measuring then VPC is not your first calss choice. Maybe only if you really want to deploy your software through VPC images.
I have been talking to a big number of customers who were asking whether we can extend the SDM in VSTS Architect – e.g. the Distributed System Designers … well, until now I always said: „Hopefully some day, yes. But nothing for real currently”.
The System Definition Model (SDM) provides a critical technology component of the long-term Dynamic Systems Initiative (DSI) roadmap that will make IT systems dramatically easier—and orders of magnitude less costly—to develop, deploy, and operate. It will provide the unifying thread enabling integrated innovation from Microsoft and our partners across application development tools, operating systems, applications, hardware, and management tools. Visual Studio 2005 Team Edition for Software Architects is a core deliverable of the DSI, which leverages the SDM to allow developers and architects to define service-oriented applications that will be configured into systems for deployment. Using the SDM SDK, you can extend the models included with the Distributed System Designers in Visual Studio 2005 Team Edition for Software Architects, which use SDM to model and validate distributed application systems for deployment into logical datacenter configurations. The System Definition Model SDK is part of the Visual Studio 2005 SDK.