Solved

Debug Execution Time for Each Line of Code

Posted on 2009-07-15
2
210 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
ID: 24862850
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

773 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