ResourceMetrics

Playwright\Performance\Metrics\ResourceMetrics

$ composer require playwright-php/performance

Methods

__construct()

function __construct( public readonly string $url, public readonly float $duration, public readonly int $size, public readonly string $type, public readonly float $startTime, public readonly float $fetchStart, public readonly float $domainLookupStart, public readonly float $domainLookupEnd, public readonly float $connectStart, public readonly float $connectEnd, public readonly float $requestStart, public readonly float $responseStart, public readonly float $responseEnd, )

getDnsTime()

float

Get DNS lookup time in milliseconds.

function getDnsTime(): float

getConnectionTime()

float

Get TCP connection time in milliseconds.

function getConnectionTime(): float

getTtfb()

float

Get time to first byte in milliseconds.

function getTtfb(): float

getDownloadTime()

float

Get download time in milliseconds.

function getDownloadTime(): float

toArray()

array
function toArray(): array