public function stop() {
		global $wpdb, $wp_object_cache;

		if ( ! is_null( $this->start_time ) ) {
			$this->time += microtime( true ) - $this->start_time;
		}
		if ( ! is_null( $this->query_offset ) && isset( $wpdb ) && ! empty( $wpdb->queries ) ) {
			for ( $i = $this->query_offset; $i < count( $wpdb->queries ); $i++ ) {
				$this->query_time += $wpdb->queries[ $i ][1];
				$this->query_count++;
			}
		}

		if ( ! is_null( $this->cache_hit_offset ) && ! is_null( $this->cache_miss_offset ) && isset( $wp_object_cache ) ) {
			$cache_hits         = ! empty( $wp_object_cache->cache_hits ) ? $wp_object_cache->cache_hits : 0;
			$cache_misses       = ! empty( $wp_object_cache->cache_misses ) ? $wp_object_cache->cache_misses : 0;
			$this->cache_hits   = $cache_hits - $this->cache_hit_offset;
			$this->cache_misses = $cache_misses - $this->cache_miss_offset;
			$cache_total        = $this->cache_hits + $this->cache_misses;
			if ( $cache_total ) {
				$ratio             = ( $this->cache_hits / $cache_total ) * 100;
				$this->cache_ratio = round( $ratio, 2 ) . '%';
			}
		}

		$this->start_time        = null;
		$this->query_offset      = null;
		$this->cache_hit_offset  = null;
		$this->cache_miss_offset = null;
		if ( false !== ( $key = array_search( $this, self::$active_loggers ) ) ) {
			unset( self::$active_loggers[ $key ] );
		}
	}
public function stop() {
		global $wpdb, $wp_object_cache;

		if ( ! is_null( $this->start_time ) ) {
			$this->time += microtime( true ) - $this->start_time;
		}
		if ( ! is_null( $this->query_offset ) && isset( $wpdb ) && ! empty( $wpdb->queries ) ) {
			for ( $i = $this->query_offset; $i < count( $wpdb->queries ); $i++ ) {
				$this->query_time += $wpdb->queries[ $i ][1];
				$this->query_count++;
			}
		}

		if ( ! is_null( $this->cache_hit_offset ) && ! is_null( $this->cache_miss_offset ) && isset( $wp_object_cache ) ) {
			$cache_hits         = ! empty( $wp_object_cache->cache_hits ) ? $wp_object_cache->cache_hits : 0;
			$cache_misses       = ! empty( $wp_object_cache->cache_misses ) ? $wp_object_cache->cache_misses : 0;
			$this->cache_hits   = $cache_hits - $this->cache_hit_offset;
			$this->cache_misses = $cache_misses - $this->cache_miss_offset;
			$cache_total        = $this->cache_hits + $this->cache_misses;
			if ( $cache_total ) {
				$ratio             = ( $this->cache_hits / $cache_total ) * 100;
				$this->cache_ratio = round( $ratio, 2 ) . '%';
			}
		}

		$this->start_time        = null;
		$this->query_offset      = null;
		$this->cache_hit_offset  = null;
		$this->cache_miss_offset = null;
		if ( false !== ( $key = array_search( $this, self::$active_loggers ) ) ) {
			unset( self::$active_loggers[ $key ] );
		}
	}
public function stop ( ) { global $ wpdb , $ wp_object_cache ; if ( ! is_null ( $ this -> start_time ) ) { $ this -> time += microtime ( true ) - $ this -> start_time ; } if ( ! is_null ( $ this -> query_offset ) && isset ( $ wpdb ) && ! empty ( $ wpdb -> queries ) ) { for ( $ i = $ this -> query_offset ; $ i < count ( $ wpdb -> queries ) ; $ i ++ ) { $ this -> query_time += $ wpdb -> queries [ $ i ] [ 1 ] ; $ this -> query_count ++ ; } } if ( ! is_null ( $ this -> cache_hit_offset ) && ! is_null ( $ this -> cache_miss_offset ) && isset ( $ wp_object_cache ) ) { $ cache_hits = ! empty ( $ wp_object_cache -> cache_hits ) ? $ wp_object_cache -> cache_hits : 0 ; $ cache_misses = ! empty ( $ wp_object_cache -> cache_misses ) ? $ wp_object_cache -> cache_misses : 0 ; $ this -> cache_hits = $ cache_hits - $ this -> cache_hit_offset ; $ this -> cache_misses = $ cache_misses - $ this -> cache_miss_offset ; $ cache_total = $ this -> cache_hits + $ this -> cache_misses ; if ( $ cache_total ) { $ ratio = ( $ this -> cache_hits / $ cache_total ) * 100 ; $ this -> cache_ratio = round ( $ ratio , 2 ) . '%' ; } } $ this -> start_time = null ; $ this -> query_offset = null ; $ this -> cache_hit_offset = null ; $ this -> cache_miss_offset = null ; if ( false !== ( $ key = array_search ( $ this , self :: $ active_loggers ) ) ) { unset ( self :: $ active_loggers [ $ key ] ) ; } }
Stop this logger
Stop this logger