Environment: VC6.0
Main features of QProfile toolkit:
1. Application runs at the same speed as usual
2. You can get per-thread information
3. Profiling is independent from development enviroment
4. Report can be directed/appended to file or/and consol
or/and VC++ debug window
5. Results can be sorted by total time, pure time,
hit number or time per hit
How to use QProfile class
1. Download the QProfile source code.
2. Include QProfile.cpp file to your project
3. Add line "include "QProfile.h"" to the common header or to specific C++ file
4. Add QProfile macro to the target functions
5. Compile and run
6. Look at "QProfile.txt" or/and consol or/and VC++ debug window for results.
QProfile macros
All you have to do is to add a line to a function you want to profile.
YourClass::YourFunction(){
QPROFILE_FUN("YourClass::YourFunction");
…
if (…) return false;
…
return true;
}
If you want to get results for this function per thread:
YourClass::YourFunction(){
QPROFILE_MT_FUN1("YourFunction,thread:%lx", GetCurrentThread());
…
if (…) return false;
…
return true;
}
After program exits you’ll get profile report like this
(points are used to align HTML text)
—————– Profiling .results —————– —————————————————— |
You can find more detail at http://members.tripod.com/~DanKozub