Solved

Debug Execution Time for Each Line of Code

Posted on 2009-07-15
2
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

696 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