PHP 클래스 DebugKit\DebugTimer

파일 보기 프로젝트 열기: cakephp/debug_kit 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_timers array Internal timers array

공개 메소드들

메소드 설명
clear ( ) : boolean Clear all existing timers
elapsedTime ( string $name = 'default', integer $precision = 5 ) : float Get the difference in time between the timer start and timer end.
getAll ( boolean $clear = false ) : array Get all timers that have been started and stopped.
requestStartTime ( ) : float get the time the current request started.
requestTime ( ) : float Get the total execution time until this point
start ( string $name = null, string $message = null ) : boolean Start an benchmarking timer.
stop ( string $name = null ) : boolean Stop a benchmarking timer.

메소드 상세

clear() 공개 정적인 메소드

Clear all existing timers
public static clear ( ) : boolean
리턴 boolean true

elapsedTime() 공개 정적인 메소드

Get the difference in time between the timer start and timer end.
public static elapsedTime ( string $name = 'default', integer $precision = 5 ) : float
$name string the name of the timer you want elapsed time for.
$precision integer the number of decimal places to return, defaults to 5.
리턴 float number of seconds elapsed for timer name, 0 on missing key

getAll() 공개 정적인 메소드

Calculates elapsed time for each timer. If clear is true, will delete existing timers
public static getAll ( boolean $clear = false ) : array
$clear boolean false
리턴 array

requestStartTime() 공개 정적인 메소드

get the time the current request started.
public static requestStartTime ( ) : float
리턴 float time of request start

requestTime() 공개 정적인 메소드

Get the total execution time until this point
public static requestTime ( ) : float
리턴 float elapsed time in seconds since script start.

start() 공개 정적인 메소드

Start an benchmarking timer.
public static start ( string $name = null, string $message = null ) : boolean
$name string The name of the timer to start.
$message string A message for your timer
리턴 boolean Always true

stop() 공개 정적인 메소드

$name should be the same as the $name used in startTimer().
public static stop ( string $name = null ) : boolean
$name string The name of the timer to end.
리턴 boolean true if timer was ended, false if timer was not started.

프로퍼티 상세

$_timers 보호되어 있는 정적으로 프로퍼티

Internal timers array
protected static array $_timers
리턴 array