Make WordPress Core

Changeset 55459


Ignore:
Timestamp:
03/03/2023 08:37:10 PM (23 months ago)
Author:
joemcgill
Message:

Build/Test Tools: Add a performance measurement workflow.

This adds a new GitHub Action workflow that measures a set of performance metrics on every commit, so we can track changes in the performance of WordPress over time and more easily identify changes that are responsible for significant performance improvements or regressions during development cycles.

The workflow measures the homepage of a classic theme (Twenty Twenty-One) and a block theme (Twenty Twenty-Three) set up with demo content from the Theme Test Data project. Using the e2e testing framework, it makes 20 requests and records the median value of the following Server Timing metrics, generated by an mu-plugin installed as part of this workflow:

  • Total server response time
  • Server time before templates are loaded
  • Server time during template rendering

In addition to measuring the performance metrics of the current commit, it also records performance metrics of a consistent version of WordPress (6.1.1) to be used as a baseline measurement in order to remove variance caused by the GitHub workers themselves from our reporting.

The measurements are collected and displayed at https://www.codevitals.run/project/wordpress.

Props adamsilverstein, mukesh27, flixos90, youknowriad, oandregal, desrosj, costdev, swissspidy.
Fixes #57687.

Location:
trunk
Files:
15 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/.gitignore

    r55303 r55459  
    1515/tests/phpunit/data/.trac-ticket-cache*
    1616/tests/qunit/compiled.html
     17/tests/performance/**/*.test.results.json
    1718/src/.wp-tests-version
    1819/node_modules
  • trunk/package.json

    r55440 r55459  
    177177        "env:logs": "node ./tools/local-env/scripts/docker.js logs",
    178178        "env:pull": "node ./tools/local-env/scripts/docker.js pull",
     179        "test:performance": "node ./tests/performance/run-tests.js",
    179180        "test:php": "node ./tools/local-env/scripts/docker.js run -T php composer update -W && node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit",
    180181        "test:e2e": "node ./tests/e2e/run-tests.js",
Note: See TracChangeset for help on using the changeset viewer.