## How to use TProfiler ???

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

### How to use TProfiler ???

Hi all....
Does anyone know how to use it???
Because i don't get it how to use it......

I want to calculate my execution time......

Thx
$^$
Member

Posts: 2
Joined: December 7th, 2007, 6:01 pm

Suppose you want to measure execution time of a procedure named Test, and you have put a TProfiler on the form and named it Profiler.

Code: Select all
procedure TForm1.FormCreate(Sender: TObject);begin  Profiler['Test'].Start;  Test;  Profiler['Test'].Stop;end;

Whenever you need, you can use AsText property of the timer to display the result on the screen.

Code: Select all
Memo1.Lines.Add(Profiler['Test'].AsText[tiAll]);

When execution of your application is finished, you can find all timing results on Events Log of Delphi. From Delphi's menu select [View -> Debug Windows -> Event Log] or press Alt+Ctrl+V.
Kambiz

Kambiz

Posts: 2428
Joined: March 7th, 2003, 7:10 pm

Wow.... it's a great and simple component to use it......

Btw the units in ms.... if i use another computer and run the program..... if the result same ???? or it depends on processor frequency ???

Thx

Regard,
-$^$-
$^$
Member

Posts: 2
Joined: December 7th, 2007, 6:01 pm

It depends on the processor.

In other hand, because Windows is a multi-tasking OS, in the same machine you may get different results. Because of that you have to run the test several times and use the average time.
Kambiz

Kambiz

Posts: 2428
Joined: March 7th, 2003, 7:10 pm

### Who is online

Users browsing this forum: No registered users and 1 guest