Count all hook calls, regardless of whether we're in a current hook

This commit is contained in:
Daniel Bachhuber 2016-08-26 09:06:49 -07:00
parent 664364aac7
commit 091e94b53e

View file

@ -69,11 +69,11 @@ class Logger {
* Start this logger's hook timer * Start this logger's hook timer
*/ */
public function start_hook_timer() { public function start_hook_timer() {
$this->hooks['count']++;
// Timer already running means a subhook has been called // Timer already running means a subhook has been called
if ( ! is_null( $this->hook_start_time ) ) { if ( ! is_null( $this->hook_start_time ) ) {
$this->hook_depth++; $this->hook_depth++;
} else { } else {
$this->hooks['count']++;
$this->hook_start_time = microtime( true ); $this->hook_start_time = microtime( true );
} }
} }