Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/wp-profiler.php

    r46586 r47122  
    22
    33/*
    4 A simple manually-instrumented profiler for WordPress.
    5 
    6 This records basic execution time, and a summary of the actions and SQL queries run within each block.
    7 
    8 start() and stop() must be called in pairs, for example:
    9 
    10 function something_to_profile() {
    11         wppf_start(__FUNCTION__);
    12         do_stuff();
    13         wppf_stop();
    14 }
    15 
    16 Multiple profile blocks are permitted, and they may be nested.
    17 
    18 */
     4 * A simple manually-instrumented profiler for WordPress.
     5 *
     6 * This records basic execution time, and a summary of the actions and SQL queries run within each block.
     7 *
     8 * start() and stop() must be called in pairs, for example:
     9 *
     10 * function something_to_profile() {
     11 *      wppf_start(__FUNCTION__);
     12 *      do_stuff();
     13 *      wppf_stop();
     14 * }
     15 *
     16 * Multiple profile blocks are permitted, and they may be nested.
     17 */
    1918
    2019class WPProfiler {
    … …  
    3433
    3534                if ( ! $this->stack ) {
    36                         // log all actions and filters
     35                        // Log all actions and filters.
    3736                        add_filter( 'all', array( $this, 'log_filter' ) );
    3837                }
    3938
    40                 // reset the wpdb queries log, storing it on the profile stack if necessary
     39                // Reset the wpdb queries log, storing it on the profile stack if necessary.
    4140                global $wpdb;
    4241                if ( $this->stack ) {
    … …  
    152151
    153152        public function _query_count( $queries ) {
    154                 // this requires the savequeries patch at https://core.trac.wordpress.org/ticket/5218
     153                // This requires the SAVEQUERIES patch at https://core.trac.wordpress.org/ticket/5218
    155154                $out = array();
    156155                foreach ( $queries as $q ) {
Note: See TracChangeset for help on using the changeset viewer.