Skip to content
PHP Ecosystem
Explore

ProfilingPanel

API reference › Debug › panels › ProfilingPanel

Renders the profiling spans captured by the Profiling collector.

Presents the request Timeline and sortable details from one filtered set of profiling spans; data acquisition lives in ProfilingCollector.

PropertyTypeDescriptionDefined by
$actionsarray<string, array<string, mixed>|class-string>Standalone actions merged into the debug module’s Module::$actionMap, keyed by action ID. Default: [].yii\debug\Panel
$behaviors read-onlyarray<yii\base\Behavior<static>>List of behaviors attached to this component.yii\base\Component
$detail read-onlystringRendered detail view.ProfilingPanel
$idstringPanel unique identifier, assigned by the container module on registration. Default: ''.yii\debug\Panel
$memorySamples read-onlylist<PHPForge\Debug\Panel\MemorySample>Memory readings recorded alongside each captured profile message.ProfilingPanel
$memoryUsage read-onlyintPeak memory recorded for the capture, in bytes; 0 before hydration.ProfilingPanel
$models read-onlylist<PHPForge\Debug\Panel\Profile\ProfileRow>Spans in capture order, suitable for ArrayDataProvider.ProfilingPanel
$moduleyii\debug\Module|nullDebug module owning this panel. Default: null.yii\debug\Panel
$name read-onlystringPanel display name.ProfilingPanel
$processingTime read-onlyfloat|nullTotal request processing time in seconds, or null before hydration.ProfilingPanel
$renderContextPHPForge\Debug\Panel\PanelRenderContext|nullPrepared render context, or null outside a debugger request.yii\debug\Panel
$requestSummary write-onlyPHPForge\Debug\Storage\RequestSummarySummary of the request currently being rendered.ProfilingPanel
$tagstringTag of the request whose data this panel currently exposes. Default: ''.yii\debug\Panel
$toolbarData read-onlyarray<string, mixed>Toolbar payload with the title blanked on success.ProfilingPanel
$toolbarIcon read-onlystringToolbar icon key.ProfilingPanel
$url read-onlystringAbsolute URL to the panel detail view.yii\debug\Panel
$viewPath read-onlystringDirectory the panel views resolve against.yii\debug\Panel
$error protectedPHPForge\Debug\Storage\ExceptionSnapshot|nullException captured when the panel failed to produce or hydrate its snapshot. Default: null.yii\debug\Panel
MethodDescriptionDefined by
__construct()Constructor.yii\base\BaseObject
__call()Calls the named method which is not a class method.yii\base\Component
__clone()This method is called after the object is created by cloning an existing one.yii\base\Component
__get()Returns the value of a component property.yii\base\Component
__isset()Checks if a property is set, i.e. defined and not null.yii\base\Component
__set()Sets the value of a component property.yii\base\Component
__unset()Sets a component property to be null.yii\base\Component
attachBehavior()Attaches a behavior to this component.yii\base\Component
attachBehaviors()Attaches a list of behaviors to the component.yii\base\Component
behaviors()Returns a list of behaviors that this component should behave as.yii\base\Component
canGetProperty()Returns a value indicating whether a property can be read.yii\base\Component
canSetProperty()Returns a value indicating whether a property can be set.yii\base\Component
capture()Captures the panel payload for the current request.yii\debug\Panel
className() staticReturns the fully qualified name of this class.yii\base\BaseObject
detachBehavior()Detaches a behavior from the component.yii\base\Component
detachBehaviors()Detaches all behaviors from the component.yii\base\Component
ensureBehaviors()Makes sure that the behaviors declared in behaviors() are attached to this component.yii\base\Component
getBehavior()Returns the named behavior object.yii\base\Component
getBehaviors()Returns all behaviors attached to this component.yii\base\Component
getDetail()Renders the unified Timeline and profiling-details view.ProfilingPanel
getError()Returns the exception captured while collecting the panel payload, if any.yii\debug\Panel
getMemorySamples()Returns the memory readings recorded alongside the spans.ProfilingPanel
getMemoryUsage()Returns the peak memory recorded for the request.ProfilingPanel
getModels()Returns the typed profiling spans consumed by the unified Timeline and details grid.ProfilingPanel
getName()Returns the panel display name from the shared title enum.ProfilingPanel
getProcessingTime()Returns the total processing time of the request.ProfilingPanel
getRenderContext()Returns the framework-neutral render context for the active debugger request, when one has been prepared.yii\debug\Panel
getToolbarData()Hides the “Profiling” title from the toolbar; the gauge icon plus the time/memory metrics are self-explanatory.ProfilingPanel
getToolbarIcon()Returns the icon key from the shared panel icon enum.ProfilingPanel
getTraceLine()Builds a trace line for the toolbar through the shared Trace renderer, applying Module::$tracePathMappings and the configured Module::$traceLine template (or callable).yii\debug\Panel
getUrl()Returns the URL pointing to this panel’s detail view for the current request tag.yii\debug\Panel
getViewPath()Returns the directory under which the panel’s relative views resolve.yii\debug\Panel
hasContent()Returns whether the panel captured content for the loaded request.yii\debug\Panel
hasError()Returns true when setError() captured an exception during panel capture or hydration.yii\debug\Panel
hasEventHandlers()Returns a value indicating whether there is any handler attached to the named event.yii\base\Component
hasMethod()Returns a value indicating whether a method is defined.yii\base\Component
hasProperty()Returns a value indicating whether a property is defined for this component.yii\base\Component
hydrate()Decodes the captured payload into the typed profiling snapshot backing this panel.ProfilingPanel
init()Initializes the object.yii\base\BaseObject
isEnabled()Indicates whether this panel is enabled and should be registered by the module.yii\debug\Panel
isVisible()Returns whether the panel should appear in the toolbar and sidebar navigation.yii\debug\Panel
moduleBound()Completes module-dependent wiring after the container module binds $id and $module.yii\debug\Panel
off()Detaches an existing event handler from this component.yii\base\Component
on()Attaches an event handler to an event.yii\base\Component
setError()Records an exception thrown during capture or hydration so LogTarget can surface it in the UI.yii\debug\Panel
setRenderContext()Installs the framework-neutral render context prepared for this panel by the debugger action.yii\debug\Panel
setRequestSummary()Supplies the canonical request start time used to position captured spans on the Timeline.ProfilingPanel
trigger()Triggers an event.yii\base\Component
getToolbarItems() protectedBuilds the toolbar items: the total processing time and the peak memory usage, rendered as neutral metric readouts.ProfilingPanel
public function getDetail(): string

Renders the unified Timeline and profiling-details view.

Returns

string: Rendered detail view.

public function getMemorySamples(): list<PHPForge\Debug\Panel\MemorySample>

Returns the memory readings recorded alongside the spans.

Returns

list<PHPForge\Debug\Panel\MemorySample>: Memory readings recorded alongside each captured profile message.

public function getMemoryUsage(): int

Returns the peak memory recorded for the request.

Returns

int: Peak memory recorded for the capture, in bytes; 0 before hydration.

public function getModels(): list<PHPForge\Debug\Panel\Profile\ProfileRow>

Returns the typed profiling spans consumed by the unified Timeline and details grid.

Returns

list<PHPForge\Debug\Panel\Profile\ProfileRow>: Spans in capture order, suitable for ArrayDataProvider.

public function getName(): string

Returns the panel display name from the shared title enum.

Returns

string: Panel display name.

public function getProcessingTime(): float|null

Returns the total processing time of the request.

Returns

float|null: Total request processing time in seconds, or null before hydration.

public function getToolbarData(): array<string, mixed>

Hides the “Profiling” title from the toolbar; the gauge icon plus the time/memory metrics are self-explanatory.

Returns

array<string, mixed>: Toolbar payload with the title blanked on success.

public function getToolbarIcon(): string

Returns the icon key from the shared panel icon enum.

Returns

string: Toolbar icon key.

public function hydrate(array<string, mixed> $payload): void

Decodes the captured payload into the typed profiling snapshot backing this panel.

Parameters

ParameterTypeDescription
$payloadarray<string, mixed>Captured panel payload.

Throws

  • PHPForge\Debug\Storage\HydrationException: when the payload does not match the snapshot schema.
public function setRequestSummary(PHPForge\Debug\Storage\RequestSummary $summary): void

Supplies the canonical request start time used to position captured spans on the Timeline.

Parameters

ParameterTypeDescription
$summaryPHPForge\Debug\Storage\RequestSummarySummary of the request currently being rendered.
protected function getToolbarItems(): array<int, array<string, mixed>>

Builds the toolbar items: the total processing time and the peak memory usage, rendered as neutral metric readouts.

Returns

array<int, array<string, mixed>>: Toolbar items in display order.