Profiler
Default constructor to create a Profiler object.
Profiler( int nDisplayNum = 10 )
EX1
#include <origin.h> #include <profiler.h> void Profiler_ex1() { Profiler tempObj(3); // Show top 3 most time consuming functions vector vSrc; matrix mat; vSrc.SetSize(500000); mat.SetSize(500,1000); for(int n=0; n<500000; n++) { vSrc[n] = (int)(rnd()*1000000); } mat.SetByVector(vSrc); vSrc.Sort(); mat.Sort(); } /* Output: Top 3 most time consuming functions: Function Name Time(sec) Num of Calls <1>Profiler::Profiler 1.377900 1 <2>Project::Profile 1.377777 1 <3>vectorbase::Sort 0.254542 1 */
Profiler.h