class ProfileTracker

Constants

protected LIMIT

The maximum number of slow tests stored per process.

Properties

protected array<string, float> $startTimes

The test start times.

protected array<int, array{name: string, duration: float}> $slowTests

The slowest tests collected in this process.

Methods

void
start(string $testId, float $time)

Start tracking a test.

void
stop(string $testId, string $name, float $time)

Stop tracking a test.

array
slowTests()

Get the slowest tests.

Details

at line 31
void start(string $testId, float $time)

Start tracking a test.

Parameters

string $testId
float $time

Return Value

void

at line 39
void stop(string $testId, string $name, float $time)

Stop tracking a test.

Parameters

string $testId
string $name
float $time

Return Value

void

at line 65
array slowTests()

Get the slowest tests.

Return Value

array