Code Profiling in Visual Studio 2005

2019-03-30 01:53发布

I have a Visual Studio 2005 Solution workspace which in turn has 8 projects included in it. I want to profile the complete code(all the projects) and get some measure about the absolute cycles taken by each function to execute, or at least percentage cycle consumptions.

I checked out help for VS 2005, and also the project setiings options but could not find any pointers on hwo to get the profile info. Any help regarding this would be beneficial.

-AD.

8条回答
姐就是有狂的资本
2楼-- · 2019-03-30 02:30

I guess the inbuilt profiler of Visual Studio 2005 comes onyl with the Developer Edition and Team Edition. I have a Professional edition which, it seems doesnot have the inbuilt profiler tool.

-AD

查看更多
ら.Afraid
3楼-- · 2019-03-30 02:37

I've used both the profiler in Compuware’s DevPartner (I like to still call it “TrueTime”) and Rational's Quantify. I always liked Quantify better, but as I've moved between companies DevPartner is usually already the “standard”.

Both are expensive, but they (seem to) add so much value that any commercial shop should have no problem investing in some seats.

Quantify didn’t require special rebuilds of the project – which was GREAT. It also crashed less (that’s not saying much, it had its own issues). DevPartner also tends to break as each new version of Visual Stuido was release (maybe this is better now?). Buy the yearly maintenance agreement if you go this way.

That said, I’ve often just write a class remembers the time at construction and spits out (log file) the elapsed time in its destructor. I used QueryPerformanceCounter. I’d stick this class at the top of the function I’d want to time. You could get fancy with making it a macro, use the preprocessor to include this class only under a special build…

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-03-30 02:39

I use Jebrains profiler is very easy to use and performs very well too.

查看更多
聊天终结者
5楼-- · 2019-03-30 02:44

I recommend you EQATEC profiler which also includes in its site a tracer.

Also it's free and easy to use.

alt text http://www.eqatec.com/tools/profiler/profiler-logo.gif

查看更多
Fickle 薄情
6楼-- · 2019-03-30 02:46

If your application is not particularly processor intensive, redgate ANTS Profiler is a good choice - the line-by-line stats can come in quite handy, and the whole product is clean and well-designed.

If your app needs a lot of CPU to operate normally, however, most of the .NET profilers on the market won't be able to handle it. The only two that I have ever found that will work for a really heavy-weight application are JetBrains dotTrace and YourKit. The two are very similar, which is not surprising, given that YourKit seems to have been started by a former JetBrains employee. I personally prefer dotTrace, but that may just be because that is what I used first, and there has never been any good reason to switch.

I have tested ANTS, AQTime, DevPartner, GlowCode, Borland OptimizeIt and Intel VTune, and all of them have too much overhead to handle a demanding application. (VTune is a possible exception, but it is so horribly complex to configure and use that I was never able to figure out exactly what it could handle. It is also very expensive.)

查看更多
Animai°情兽
7楼-- · 2019-03-30 02:46

Red-gate's Profiler is great for this.

查看更多
登录 后发表回答