CoreWebVitals

Playwright\Performance\Metrics\CoreWebVitals

$ composer require playwright-php/performance

Methods

__construct()

function __construct( public readonly float $lcp, public readonly float $fcp, public readonly float $cls, public readonly float $inp, public readonly float $fid, public readonly float $ttfb, public readonly float $tbt, )

getLCP()

float

Return collected LCP (Largest Contentful Paint).

function getLCP(): float

getFCP()

float

Return collected FCP (First Contentful Paint).

function getFCP(): float

getCLS()

float

Return collected CLS (Cumulative Layout Shift).

function getCLS(): float

getINP()

float

Return collected INP (Interaction to Next Paint).

function getINP(): float

getFID()

float

Return collected FID (First Input Delay).

function getFID(): float

getTTFB()

float

Return collected TTFB (Time to First Byte).

function getTTFB(): float

getTBT()

float

Return collected TBT (Total Blocking Time).

function getTBT(): float

toArray()

array
function toArray(): array