![]() |
Languages »
VB.NET »
Utilities
Intermediate
A simple .NET ProfilerBy Peter SchlangA DLL helping to measure process time in your applications. |
VB, .NET, Win2K, WinXP, Visual Studio, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
When optimizing my programs, I usually had the question: 'Which of my functions needs most of the time?'. Searching the web, I did not find any remarkable solution for my issue. So I had to resolve it by myself, I wrote a small DLL to be called from any of my .NET programs.
It measures the time needed inside the actual function and writes the result to a disk file, averaging (maximizing, minimizing etc.) the time used to process the function.
The DLL is rather simple, the source code consists of 160 lines (including comment lines).
To use pscProfilEx, you must:
pscProfilEx'.
Public <myProfile> As New pscProfilEx.CProfilEx'.
<myProfile>.profileOpen("<logFileName>").
<myProfile>.profileStart("<function name>").
<myProfile>.profileEnd().
<myProfile>.profileClose(). Maybe you want to avoid an 'endless' profiling inside a program running in a loop. Then, e.g., following a timer, counter or other criterion, you may insert:
<myProfile>.profileClose()
<myProfile>.profileOpen(<newLogFileName>)
wherever you want (and if applicable). This will close the current log file and create a new one.
2005-Jan-31 - First release - 2.0.0.
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 10 Apr 2006 Editor: Smitha Vijayan |
Copyright 2005 by Peter Schlang Everything else Copyright © CodeProject, 1999-2009 Web22 | Advertise on the Code Project |