This script, performance_test.js
, is designed to measure the page rendering performance of a web browser. The script measures the First Contentful Paint (FCP), which is a key performance metric indicating the time at which the first text or image is painted on the screen aster navigating to a web page.
The tool can be used to benchmark web rendering performance on specific devices: desktop, mobile, embedded (IoT).
- Measures First Contentful Paint (FCP) to evaluate the performance of a web browser in rendering a webpage.
- Logs performance metrics to the console for easy observation and analysis.
- Saves test results with associated data to a JSON file.
To run this script, follow these steps:
-
Ensure you have Node.js installed on your system. You can download it from Node.js official website.
-
Clone the repository and change directory to it.
git clone https://github.com/devpeer-net/web-rendering-performance.git
cd web-rendering-performance
- Install dependencies
npm install
- Run the script using Node.js by executing the following command:
node performance_test.js
To specify a browser version, you can set the path to its executable with the CHROME_PATH environmental variable.
For more information on available command line options see help.
node performance_test.js -h