A collection of performance tests for the real-time collaboration feature that hosting providers can run and submit back to WordPress.org.
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:
wp)The following libraries are recommended but optional:
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 .env
You 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 of username:appl icat ion- pass word.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.sh
This 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:
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.Users -> Your Profile to generate an application password.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 |