Changeset 56549 for trunk/tests/phpunit/includes/wp-profiler.php
- Timestamp:
- 09/09/2023 09:26:01 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/wp-profiler.php
r56548 r56549 73 73 if ( isset( $this->profile[ $name ] ) ) { 74 74 $this->profile[ $name ]['time'] += $time; 75 $this->profile[ $name ]['calls']++;75 ++$this->profile[ $name ]['calls']; 76 76 $this->profile[ $name ]['cache_cold_hits'] += ( $wp_object_cache->cold_cache_hits - $item['cache_cold_hits'] ); 77 77 $this->profile[ $name ]['cache_warm_hits'] += ( $wp_object_cache->warm_cache_hits - $item['cache_warm_hits'] ); … … 114 114 global $wp_actions; 115 115 if ( end( $wp_actions ) === $tag ) { 116 $this->stack[ count( $this->stack ) - 1 ]['actions'][ $tag ]++;116 ++$this->stack[ count( $this->stack ) - 1 ]['actions'][ $tag ]; 117 117 } else { 118 $this->stack[ count( $this->stack ) - 1 ]['filters'][ $tag ]++;118 ++$this->stack[ count( $this->stack ) - 1 ]['filters'][ $tag ]; 119 119 } 120 120 } … … 124 124 public function log_action( $tag ) { 125 125 if ( $this->stack ) { 126 $this->stack[ count( $this->stack ) - 1 ]['actions'][ $tag ]++;126 ++$this->stack[ count( $this->stack ) - 1 ]['actions'][ $tag ]; 127 127 } 128 128 } … … 143 143 $sql = preg_replace( '/(WHERE \w+ =) \'\[-\w]+\'/', '$1 \'xxx\'', $sql ); 144 144 145 $out[ $sql ]++;145 ++$out[ $sql ]; 146 146 } 147 147 asort( $out ); … … 154 154 foreach ( $queries as $q ) { 155 155 if ( empty( $q[2] ) ) { 156 $out['unknown']++;156 ++$out['unknown']; 157 157 } else { 158 $out[ $q[2] ]++;158 ++$out[ $q[2] ]; 159 159 } 160 160 }
Note: See TracChangeset
for help on using the changeset viewer.