private static function profile_eval_ish( $assoc_args, $profile_callback, $order = 'ASC', $orderby = null ) {
		$hook   = Utils\get_flag_value( $assoc_args, 'hook' );
		$type   = $focus = false;
		$fields = array();
		if ( $hook ) {
			$type = 'hook';
			if ( true !== $hook ) {
				$focus    = $hook;
				$fields[] = 'callback';
				$fields[] = 'location';
			} else {
				$fields[] = 'hook';
			}
		}
		$profiler = new Profiler( $type, $focus );
		$profiler->run();
		if ( $hook ) {
			$profile_callback();
			$loggers = $profiler->get_loggers();
		} else {
			$logger = new Logger();
			$logger->start();
			$profile_callback();
			$logger->stop();
			$loggers = array( $logger );
		}
		$fields    = array_merge(
			$fields,
			array(
				'time',
				'query_time',
				'query_count',
				'cache_ratio',
				'cache_hits',
				'cache_misses',
				'request_time',
				'request_count',
			)
		);
		$formatter = new Formatter( $assoc_args, $fields );
		$formatter->display_items( $loggers, false, $order, $orderby );
	}
private static function profile_eval_ish( $assoc_args, $profile_callback, $order = 'ASC', $orderby = null ) {
		$hook   = Utils\get_flag_value( $assoc_args, 'hook' );
		$type   = $focus = false;
		$fields = array();
		if ( $hook ) {
			$type = 'hook';
			if ( true !== $hook ) {
				$focus    = $hook;
				$fields[] = 'callback';
				$fields[] = 'location';
			} else {
				$fields[] = 'hook';
			}
		}
		$profiler = new Profiler( $type, $focus );
		$profiler->run();
		if ( $hook ) {
			$profile_callback();
			$loggers = $profiler->get_loggers();
		} else {
			$logger = new Logger();
			$logger->start();
			$profile_callback();
			$logger->stop();
			$loggers = array( $logger );
		}
		$fields    = array_merge(
			$fields,
			array(
				'time',
				'query_time',
				'query_count',
				'cache_ratio',
				'cache_hits',
				'cache_misses',
				'request_time',
				'request_count',
			)
		);
		$formatter = new Formatter( $assoc_args, $fields );
		$formatter->display_items( $loggers, false, $order, $orderby );
	}
private static function profile_eval_ish ( $ assoc_args , $ profile_callback , $ order = 'ASC' , $ orderby = null ) { $ hook = Utils \ get_flag_value ( $ assoc_args , 'hook' ) ; $ type = $ focus = false ; $ fields = array ( ) ; if ( $ hook ) { $ type = 'hook' ; if ( true !== $ hook ) { $ focus = $ hook ; $ fields [ ] = 'callback' ; $ fields [ ] = 'location' ; } else { $ fields [ ] = 'hook' ; } } $ profiler = new Profiler ( $ type , $ focus ) ; $ profiler -> run ( ) ; if ( $ hook ) { $ profile_callback ( ) ; $ loggers = $ profiler -> get_loggers ( ) ; } else { $ logger = new Logger ( ) ; $ logger -> start ( ) ; $ profile_callback ( ) ; $ logger -> stop ( ) ; $ loggers = array ( $ logger ) ; } $ fields = array_merge ( $ fields , array ( 'time' , 'query_time' , 'query_count' , 'cache_ratio' , 'cache_hits' , 'cache_misses' , 'request_time' , 'request_count' , ) ) ; $ formatter = new Formatter ( $ assoc_args , $ fields ) ; $ formatter -> display_items ( $ loggers , false , $ order , $ orderby ) ; }
Profile an eval or eval-file statement.
Profile an eval or eval - file statement .