Skip to content
PHP Ecosystem
Explore

ProfileTimings

API reference › Debug Core › Panel › Profile › ProfileTimings

final classPHPForge\Debug\Panel\Profile\ProfileTimings
Sourcesrc/Panel/Profile/ProfileTimings.php

Pairs profile begin/end log tuples into per-block timings.

MethodDescriptionDefined by
calculate() staticCalculates the per-block timings from profile-level log tuples.ProfileTimings
public static function calculate(list<PHPForge\Debug\Panel\Profile\LogTuple> $messages): list<PHPForge\Debug\Panel\Profile\ProfileTiming>

Calculates the per-block timings from profile-level log tuples.

Each tuple is [token, level, category, timestamp, traces, memory]; a begin marker is matched with the next end marker carrying the same token, producing one timing entry ordered by the begin position.

Parameters

ParameterTypeDescription
$messageslist<PHPForge\Debug\Panel\Profile\LogTuple>Profile log tuples in capture order.

Returns

list<PHPForge\Debug\Panel\Profile\ProfileTiming>: Timings ordered by their begin marker.