Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

PerformanceDiagnostics4Delphi

A simple class, which makes the analysis of time performance of methods, simpler and more efficient.

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

PerformanceDiagnostics4Delphi

A simple class, which makes the analysis of time performance of methods, simpler and more efficient. Works based on TObject and String(MethodName).

For install in your project using boss:

bash
$ boss install github.com/EduardoGrtt/PerformanceDiagnostics4Delphi:1.0.0

How to Use

To use this API you must add the "PerformanceDiagnostics4Delphi\src" Path in your Delphi or on your project.

Sample

pascal
var
  APerformance: IPerformanceDiagnostics;
  AMyObject: TMyClass;
begin
  AMyObject := TMyClass.Create;
  try
    {Execute is a method of TMyClass}
    APerformance := TPerformanceDiagnostics.New(AMyObject).Add('Execute');
    AMyObject.Execute;
  finally
    AMyObject.Free;
  end;
  ShowMessage(Format('%f seconds', [APerformance.GetTotalSeconds]));
end;