Reputation: 12015
As a C# programmer, i'm in a transition from small projects to medium projects. I didn't need a profiler for my little projects before. But now I need a tool that help me improving the performance of my code. I used gprof many years ago, in C.
Can someone give me a starting point, or recommend me a tool like gprof for VS2008? That is: A tool that counts how many times every function has been called, and how many time It's spended in every function. No matter if a had to pay for it (under certains limits).
Any other advice about how to locate portions of code that should be optimized will be great.
Thanks.
Upvotes: 2
Views: 3437
Reputation: 40709
Any other advice about how to locate portions of code that should be optimized will be great.
You can do better than gprof or anything that acts like it.
Upvotes: 1
Reputation: 30819
I've used DotTrace and AQTime both are easy to use and understand.
Upvotes: 1
Reputation: 34549
Visual Studio has this functionality built in depending on the version you are using. Within Professional (I believe), you have the Profiling section which gives you timing within functions inclusive and exclusive of further calls, # of calls etc...
It is normally located under the 'Analyze' menu option if it's there.
EDIT
Come VS2010 this has also been greatly improved. Featuring some very cool looking multi-threaded performance analysis, showing you what sort of operations the thread spends its time doing/blocking on. It also displays line by line timings I believe within your code (certainly the last screenshot I saw did).
Upvotes: 2