Download the PHP package playwright-php/performance without Composer
On this page you can find all versions of the php package playwright-php/performance. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download playwright-php/performance
More information about playwright-php/performance
Files in playwright-php/performance
Package performance
Short Description Performance monitoring for Playwright PHP: collect Core Web Vitals and resource metrics
License MIT
Informations about the package performance


[](https://packagist.org/packages/playwright-php/performance)

Playwright PHP Performance
Collect Core Web Vitals and resource timing data from pages opened with Playwright PHP.
Installation
The package requires PHP 8.2+ and Playwright PHP 1.x.
Quick Start
Navigate to a page, collect its metrics, and generate a report:
CoreWebVitals exposes LCP, FCP, CLS, INP, FID, TTFB, and TBT as public readonly properties and through getter methods.
Each ResourceMetrics value contains the URL, resource type, duration, transfer size, and detailed network timing values.
PHPUnit Assertions
Use PerformanceAssertions with the core Playwright test case to enforce broad, stable budgets:
Shared CI runners vary. Use budgets that detect meaningful regressions instead of asserting exact timings.
Reports
JsonReporter produces structured JSON. MarkdownReporter produces a readable summary with Core Web Vitals and the slowest resources.
Testing Without a Browser
MockPerformanceMonitor implements the same interface as the browser-backed monitor:
Limits
- Automated browser metrics are laboratory data, not real-user monitoring.
- INP and FID require user interaction and may remain zero in page-load tests.
- Browser and runner variance can make narrow timing thresholds unreliable.
Documentation
Contributing
Contributions are welcome. Before submitting a pull request, run:
License
Playwright PHP Performance is released under the MIT License.