Make WordPress Core


Ignore:
Timestamp:
11/08/2023 10:30:21 AM (3 years ago)
Author:
swissspidy
Message:

Build/Test Tools: Expand performance test scenarios.

Adds new tests for localized sites as well as the dashboard.
Also amends Server-Timing output to measure memory usage in all scenarios.

Props swissspidy, joemcgill, flixos90, mukesh27, mamaduka.
See #59656.
Fixes #59815.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/performance/wp-content/mu-plugins/server-timing.php

    r56559 r57083  
    2626                                $server_timing_values['total'] = $server_timing_values['before-template'] + $server_timing_values['template'];
    2727
     28                                /*
     29                                 * While values passed via Server-Timing are intended to be durations,
     30                                 * any numeric value can actually be passed.
     31                                 * This is a nice little trick as it allows to easily get this information in JS.
     32                                 */
     33                                $server_timing_values['memory-usage'] = memory_get_usage();
     34
    2835                                $header_values = array();
    2936                                foreach ( $server_timing_values as $slug => $value ) {
Note: See TracChangeset for help on using the changeset viewer.