Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#58825 closed task (blessed) (fixed)

Run automated performance workflows using production environment vars

Reported by: joemcgill Owned by: joemcgill
Priority: normal Milestone: 6.4
Component: Build/Test Tools Version:
Severity: normal Keywords: has-patch
Cc: Focuses: performance

Description

The automated performance tests that run as part of ​this workflow use the Docker environment bundled in the Core repo to set up an environment for testing. However, this environment gets configured using the included .env configuration file, which is meant for setting up an environment for WordPress core development, not production, including setting environment variables like WP_DEBUG and SCRIPT_DEBUG to true, and WP_DEVELOPMENT_MODE to core, all of which can cause side effects that skew performance results.

To get a better picture of how changes are effecting WP performance in standard production configurations, the Docker environment should be configured with the following environment variables (at minimum):

  • WP_DEBUG === false
  • SCRIPT_DEBUG === false
  • WP_DEVELOPMENT_MODE === ''

Attachments (1)

58825.diff​ (4.0 KB ) - added by rajinsharwar 3 years ago.

Download all attachments as: .zip

Change History (11)

This ticket was mentioned in ​PR #4879 on ​WordPress/wordpress-develop by ​@rajinsharwar.


3 years ago
#1

  • Keywords has-patch added; needs-patch removed

Update performance.yml for running automated performance workflows using production environment vars.

Trac ticket: https://core.trac.wordpress.org/ticket/58825

#2 follow-up: @desrosj
3 years ago

  • Keywords needs-refresh added

I added some feedback on the PR. While this can be committed during RC, I'm leaning towards just punting and backporting when it's landed. Going to leave for a few more days.

​@rajinsharwar commented on ​PR #4879:


3 years ago
#3

Hi @desrosj, I tried to implement your suggestion. Let me know if I missed something.

@rajinsharwar
3 years ago

#4 in reply to: ↑ 2 @joemcgill
3 years ago

  • Milestone 6.3 → 6.4

Replying to desrosj:

While this can be committed during RC, I'm leaning towards just punting and backporting when it's landed. Going to leave for a few more days.

Let's go ahead and make a clean change as part of the 6.4 release branch. Not sure there is much value in backporting at this point.

​@rajinsharwar commented on ​PR #4879:


3 years ago
#5

Hi @joemcgill, I tried to implement your suggestion. Can you take a look now?

#6 @joemcgill
3 years ago

  • Keywords needs-refresh removed
  • Owner set to joemcgill
  • Status new → assigned

@desrosj the updates to ​the PR look good to me now, but would appreciate your thoughts about this, and whether we should consider applying this to the 6.3 branch as well.

#7 @mukesh27
3 years ago

@joemcgill Per ​Benchmarking PHP performance with Server-Timing document.

(Optional, but recommended) Disable any debugging features of WordPress, e.g. set constants like WP_DEBUG, SCRIPT_DEBUG, SAVEQUERIES, to false.

Could we add SAVEQUERIES to false also?

#8 @rajinsharwar
3 years ago

Hi @desrosj @joemcgill, added the SAVEQUERIES as per the suggestion of @mukesh27.

#9 @joemcgill
3 years ago

  • Resolution → fixed
  • Status assigned → closed

In 56313:

Build/Test Tools: Run performance tests using production env vars.

This sets the following environment variables when running automated performance tests to avoid side effects that can skew performance data when the default development environment variables are used:

  • SAVEQUERIES: false
  • SCRIPT_DEBUG: false
  • WP_DEBUG: false
  • WP_DEVELOPMENT_MODE: ''

Props rajinsharwar, desrosj, mukesh27, joemcgill.
Fixes #58825.

​joemcgill commented on ​PR #4879:


3 years ago
#10

Merged in https://core.trac.wordpress.org/changeset/56313. Thanks again @Rajinsharwar!

Note: See TracTickets for help on using tickets.