This repository is a set of scripts intended to run within a hosting environment to provide performance data for the new real-time collaboration feature shipping in WordPress 7.0.
This data will help Core contributors determine which architectural approach is the most sound and safest at scale.
The following tools are required to run this test script:
- bash
- cURL
- WP-CLI (configured to run at
wp) - patch
The following libraries are recommended but optional:
- openssl
First, of you are a hosting provider looking to run these tests, thank you!
Here are the list of steps to follow:
This repository can be cloned anywhere on a server.
git clone https://github.com/WordPress/distributed-rtc-performance-testing.git <path>While the runner is designed to run without any file modifications, it does require some configuration through a handful of environment variables (see .env.example for an annotated overview) which are documentated below.
Run the following command to create an .env file from the example:
cp .env.example .envYou can then edit the .env file using the editor of your choice to adjust the configuration.
The following variables must be configured:
WP_PATH: This should be the absolute path of root directory for the test WordPress installation.ENVIRONMENT_NAME: A descriptive label of the environment running the tests. For example, "Performance Shared" or "Managed eCommerce". This will help the Core contributors analyzing the data understand the type of hosting.REPORTER_API_KEY: The credentials of the reporting user the format ofusername:appl icat ion- pass word.
- Hosts participating in the PHPUnit Hosting Tests can reuse the same credentials for this test runner.
- If you do not have a test bot and need to set one up, see the Submitting Test Results section below.
WARNING: The test runner will erase the contents of the configured site. Do not configure the test runner to use a production site, or any site that cannot be wiped clean.
bash run.shThis will set up the environment, run the tests, and attempt to submit the results to WordPress.org.
A WordPress.org bot account is required to submit test results.
If you have participated in the PHPUnit Distributed Hosting Tests before, please reuse the same bot account and create a new application password. Here are the steps from the :
Otherwise, please follow these steps below:
- Create a bot WordPress.org account. If your company is Wonderful Hosting, Inc., this bot account username might be
wonderfulbot. Make sure to set its email address to something monitored by a human. Please add a Gravatar/logo and URL that clearly represents your company to the profile as well. - Create a new issue requesting the bot user be added to this WordPress.org site as a "Test Reporter"**. The email address associated with the user is required.
- After your bot user has been added, sign in to the Making WordPress Hosting site as the bot and visit
Users -> Your Profileto generate an application password. - Set the application password as an environment variable: export REPORTER_API_KEY='wonderfulbot:Osho NHgM xYSY UWF9 qNUn YdjV'.
The test runner measures the performance of 4 different approaches to data storage for the RTC feature.
| # | Approach | name | PR |
|---|---|---|---|
| 1 | Post meta — RC2 baseline | post-meta |
NA |
| 2 | Custom table for all data | custom-table |
#11256 |
| 3 | Post meta + transients for awareness | post-meta-transients |
#11348 |
| 4 | Custom table + object cache for awareness | custom-table-with-transients |
#11599 |