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()
floatReturn collected LCP (Largest Contentful Paint).
function getLCP(): float
getFCP()
floatReturn collected FCP (First Contentful Paint).
function getFCP(): float
getCLS()
floatReturn collected CLS (Cumulative Layout Shift).
function getCLS(): float
getINP()
floatReturn collected INP (Interaction to Next Paint).
function getINP(): float
getFID()
floatReturn collected FID (First Input Delay).
function getFID(): float
getTTFB()
floatReturn collected TTFB (Time to First Byte).
function getTTFB(): float
getTBT()
floatReturn collected TBT (Total Blocking Time).
function getTBT(): float
toArray()
arrayfunction toArray(): array