Overview of RequestCore
mastercurl_multi_exec() via MultiCurl, allowing multiple HTTP requests to be executed in parallel.repository·master·Indexed 25 days ago
https://github.com/catchpoint/webpagetestThe official performance-testing engine used at webpagetest.org. This repository provides tools for running web performance tests, bulk testing via REST API, and local development setup using Docker Compose with Nginx, PHP 7.4-FPM, and WPT Agents. It includes documentation on configuring environment settings, debugging PHP with XDebug, running unit tests with PHPUnit, and integrating with the AWS SDK for PHP and PHPStats.
curl_multi_exec() via MultiCurl, allowing multiple HTTP requests to be executed in parallel.The AWS SDK for PHP provides several high-level features:
WebPageTest is migrating its www codebase to the Laravel framework using a three-phase approach to minimize disruption. The migration moves the application logic from a legacy structure into a Laravel root directory (referred to in documentation as possum/ or [LARAVELROOT]).
Key architectural shifts include:
/www/index.php to [LARAVELROOT]/routes/web.php.[LARAVELROOT]/resources/views/.[LARAVELROOT]/app/wpt/ and eventually into formal Laravel Controllers and Models.[LARAVELROOT]/public directory is intended to be publicly facing.WebPageTest provides two variations of the Time to Interactive (TTI) metric to measure when a page becomes usable and responsive to user input:
To use a Raspberry Pi as a tethered host for driving the WebPageTest mobile agent, the following hardware is recommended:
For initial setup, a USB keyboard and an HDMI monitor are required.
If you want to run a standalone agent instead of the one bundled in the Docker Compose setup, follow these steps:
docker-compose.yml, comment out the agent: section:#### DOCKER WPTAGENT - comment this out to run a standalone agent ####
agent:
cap_add:
- NET_ADMIN
build:
context: .
dockerfile: docker/local/Dockerfile-wptagent
environment:
- SERVER_URL=http://web/work/
- LOCATION=Test
- KEY=123456789
init: true
#### ####python3 wptagent.py -vvvv --xvfb --testurl www.google.com--server flag. The default configuration values (Location and Key) are defined in docker/local/wptconfig/locations.ini:python3 wptagent.py -vvvv --xvfb --server http://127.0.0.1:80/work/ --location Test --key 123456789python3 wptagent.py -vvvv --xvfb --server http://127.0.0.1:80/work/ --location Test --key 123456789To run Microsoft Edge tests on a private WebPageTest instance, the host machine must meet the following requirements:
xperf is added to the system PATH.pip install seleniumTo run a local development environment for WebPageTest including Nginx, PHP 7.4-FPM, and a WPT Agent, follow these steps:
git clone https://github.com/catchpoint/WebPageTest.git
cd webpagetestsudo docker-compose uphttp://localhost.Note on Platforms:
Traffic Shaping: To ensure traffic shaping works on supported platforms, you must run docker-compose with sudo privileges.
git clone https://github.com/catchpoint/WebPageTest.git
cd webpagetest
sudo docker-compose upWebPageTest allows you to measure when specific critical elements appear on screen. You can define custom hero elements using two methods:
elementtiming attribute to any element (based on the Hero Text Element Timing proposal).{ "heroElementName": "elementSelector" }.{ "intro": "p.introduction", "buyButton": ".item .buy" }Reverse-tethering allows the Raspberry Pi to provide wired network connectivity to the phone via USB. This improves scaling and consistency.
Requirements:
Setup Steps:
sudo apt-get remove avahi-daemon dhcpcd5
sudo apt-get install ifplugd bridge-utilsifplugd:
Run sudo dpkg-reconfigure ifplugd, add usb0 to the dynamic interface list, and add the -b flag to the command-line options./etc/network/interfaces to set up a bridge (br0) between eth0 and usb0 with a static IP.agent.sh script to include the --rndis444 flag in the pidriver.sh command. The format is: "<IP>/,<gateway>,<dns1>,<dns2>".Example Flag:
--rndis444 "192.168.0.yy/24,192.168.0.1,192.168.0.1,192.168.0.1"
You can quickly spin up a private WebPageTest instance using pre-configured Amazon Machine Images (AMIs).
ami-fcfd6194ami-e44853a1ami-d7bde6e7ami-0fce7112ami-9978f6eeami-22cefd3fami-88bd97daami-eb3542d1ami-66233967/home/ubuntu/.ssh/authorized_keys to ensure old keys are removed.ec2_key and ec2_secret via EC2 User Data at launch.Security Warning: Remove your ec2_key and ec2_secret from the instance user data after the initial launch to prevent security leaks.
headless=0 in user data to enable a UI./var/www/webpagetest/www/settings/keys.ini.ec2_key=AKIAJKP75OFSROV5GWEQ
ec2_secret=<secret for the key>
api_key=MyAPIKey
headless=0