Skip to content
PHP Ecosystem
Explore

TimelineGeometry

API reference › Debug Core › Panel › Timeline › TimelineGeometry

final classPHPForge\Debug\Panel\Timeline\TimelineGeometry
Sourcesrc/Panel/Timeline/TimelineGeometry.php

Computes framework-neutral timeline ruler positions and profile-span geometry.

MethodDescriptionDefined by
rulers() staticReturns adaptive ruler ticks keyed by milliseconds and valued by percentage offsets.TimelineGeometry
spans() staticConverts captured profile rows into positioned timeline spans.TimelineGeometry
public static function rulers(float $duration, int $line = 6): array<int, float>

Returns adaptive ruler ticks keyed by milliseconds and valued by percentage offsets.

Parameters

ParameterTypeDescription
$durationfloat
$lineint

Returns

array<int, float>: Ruler offsets.

public static function spans(list<PHPForge\Debug\Panel\Profile\ProfileRow> $rows, float $start, float $duration): list<PHPForge\Debug\Panel\Timeline\TimelineSpanRow>

Converts captured profile rows into positioned timeline spans.

Parameters

ParameterTypeDescription
$rowslist<PHPForge\Debug\Panel\Profile\ProfileRow>Profile rows in capture order.
$startfloat
$durationfloat

Returns

list<TimelineSpanRow>: Positioned spans in capture order.