Solved

Debug Execution Time for Each Line of Code

Posted on 2009-07-15
2
206 Views
Last Modified: 2013-11-26
Hello,

I've written an application in vb.net 2005 which loads a table from SQL server and then fills a table with the data.
Its now in a production environment for testing and its very slow at filling the table.
It isnt slow to load the data from the server because i've put in a message box to tell me when the .Fill has finished execution. It is slow to fill the table.

(sub-note: I have a treeview control and have to scan the tree to see if it contains a "parent". If doesn't exist then either a new parent node is added to the tree, or if a parent is found, a "child" is place under that parent. I believe it is the for..loop which is slow)

I'd like to run the code and receive a list of all the code and a measurement by each line telling me how long it took to execute.

I dont want to use the Timer method (i.e.storing the start time of the code and using the end time to work out the total execution time). This would be impractical as I need to do this for every line of code.

I'd prefer a piece of debugging software, that has a free-trial or is free :-)
Or something that's built into visual studio.

Many thanks
Dan
0
Comment
Question by:DanJourno
2 Comments
 
LVL 11

Accepted Solution

by:
azarc3 earned 500 total points
Comment Utility
If you're running Visual Studio 2005 Team System then use the Profiler. If not, then the best of breed tool is NCover... which is unfortunately very expensive. If you've got the budget for either, I would suggest NCover but also go with either VS 2005 Team Edition for Software Developers...

There's an open source tool, PartCover, which I have no experience with at all. It also concerns me that the tool appears to come out of Eastern Europe without offering a source code that I can build for myself to make sure it's not doing anything crazy behind the covers.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now