Skip to main content

Profiler

Provides performance measurement tools (execution time, memory, ...).


constructor

Class constructor.

public constructor();

Usage

TODO

formatMetrics

Formats the given profiler metrics into a human-readable string.

public static formatMetrics(metrics: Measurement[]): string;

Parameters

  • metrics: Profiler metrics.

Returns

Formatted metrics.

Usage

TODO

getCpuAverageLoad

Computes current CPU average load. See https://gist.github.com/GaetanoPiazzolla/c40e1ebb9f709d091208e89baf9f4e00.

public static getCpuAverageLoad(): CpuLoad;

Parameters

  • metrics: Profiler metrics.

Returns

Current CPU average load.

Usage

TODO

reset

Resets profiling.

public reset(): void;

Parameters

  • metrics: Profiler metrics.

Usage

TODO

snapshot

Creates a snapshot of current performance metrics under the given name.

public snapshot(name: string): void;

Parameters

  • metrics: Profiler metrics.
  • name: Snapshot name.

Usage

TODO

getMetrics

Returns collected performance metrics for the current profiling session.

public getMetrics(): Measurement[];

Parameters

  • name: Snapshot name.

Returns

Collected metrics.

Usage

TODO