Skip to content

dsogari/delphi-profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

delphi-profiler

Profile Viewer Screen

A tracing profiler for Delphi.

Example

program ProfilerClientTest;

uses
  System.SysUtils,
  Delphi.Profiler;

var
  LongLived: IInterface;

procedure Innermost;
begin
  Trace('Innermost');
  Sleep(50);
  LongLived := nil;
  Sleep(100);
end;

procedure Inner;
begin
  Trace('Inner');
  Sleep(50);
  Innermost;
  Sleep(50);
  Innermost;
  Sleep(50);
end;

procedure Outter;
begin
  Trace('Outter');
  Sleep(50);
  Inner;
  Sleep(50);
  Inner;
  Sleep(50);
end;

procedure Outtermost;
begin
  Trace('Outtermost');
  Sleep(50);
  Trace('LongLived', LongLived);
  Outter;
  Sleep(50);
  Outter;
  Sleep(50);
end;

begin
  Outtermost;
end.

Output file profile.csv (entries are sorted in descending order of total time):

"Scope Name","Total Calls","Total Time (us)","Avg. Time (us)"
"Innermost","8","1358899.90","169862.49"
"Inner","4","746657.20","186664.30"
"Outter","2","363359.80","181679.90"
"Outtermost","1","183030.00","183030.00"
"LongLived","1","179745.10","179745.10"

Output file stats.csv:

"Measure","Mean","Median","Standard Dev."
"Total Calls","3.20","2.00","2.95"
"Total Time (us)","566338.40","363359.80","499561.96"
"Avg. Time (us)","180196.36","181679.90","6305.89"

About

A tracing profiler for Delphi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages