PHP 클래스 CI_Benchmark, TastyIgniter

This class enables you to mark points and calculate the time difference between them. Memory consumption can also be displayed.
저자: EllisLab Dev Team
파일 보기 프로젝트 열기: tastyigniter/tastyigniter

공개 프로퍼티들

프로퍼티 타입 설명
$marker array List of all benchmark markers

공개 메소드들

메소드 설명
elapsed_time ( string $point1 = '', string $point2 = '', integer $decimals = 4 ) : string Elapsed time
mark ( string $name ) : void Set a benchmark marker
memory_usage ( ) : string Memory Usage

메소드 상세

elapsed_time() 공개 메소드

Calculates the time difference between two marked points. If the first parameter is empty this function instead returns the {elapsed_time} pseudo-variable. This permits the full system execution time to be shown in a template. The output class will swap the real value for this variable.
public elapsed_time ( string $point1 = '', string $point2 = '', integer $decimals = 4 ) : string
$point1 string A particular marked point
$point2 string A particular marked point
$decimals integer Number of decimal places
리턴 string Calculated elapsed time on success, an '{elapsed_string}' if $point1 is empty or an empty string if $point1 is not found.

mark() 공개 메소드

Multiple calls to this function can be made so that several execution points can be timed.
public mark ( string $name ) : void
$name string Marker name
리턴 void

memory_usage() 공개 메소드

Simply returns the {memory_usage} marker. This permits it to be put it anywhere in a template without the memory being calculated until the end. The output class will swap the real value for this variable.
public memory_usage ( ) : string
리턴 string '{memory_usage}'

프로퍼티 상세

$marker 공개적으로 프로퍼티

List of all benchmark markers
public array $marker
리턴 array