VISU - PHP Game Framework

CPUProfiler
in package
implements ProfilerInterface

Table of Contents

Interfaces

ProfilerInterface

Properties

$enabled  : bool
Enable / disable the profiler
$sampleCount  : int
The number of samples collected for each query.
$recordings  : array<string, array<string|int, int>>
An array of per scope recordings in nanoseconds
$scopeCpuStart  : array<string, int>
An array of per scope starting times

Methods

end()  : void
Ends the current profiling scope
finalize()  : void
Finalizes the profiling, cleans up internal state to ensure scopes are removed when not activley mesured anymore.
start()  : void
Starts a profiling scope

Properties

$enabled

Enable / disable the profiler

public bool $enabled = false

$sampleCount

The number of samples collected for each query.

public int $sampleCount = 64

$recordings

An array of per scope recordings in nanoseconds

private array<string, array<string|int, int>> $recordings = []

$scopeCpuStart

An array of per scope starting times

private array<string, int> $scopeCpuStart = []

Methods

end()

Ends the current profiling scope

public end(string $scope) : void
Parameters
$scope : string

The name of the scope to end

finalize()

Finalizes the profiling, cleans up internal state to ensure scopes are removed when not activley mesured anymore.

public finalize() : void

start()

Starts a profiling scope

public start(string $scope) : void
Parameters
$scope : string

        
On this page

Search results