PHP 클래스 XHProfRuns_Default, xhprof

This modified version of the file uses a MySQL backend to store the data, it also stores additional information outside the run itself (beyond simply the run id) to make comparisons and run location easier
저자: Kannan
저자: Paul Reinheimer (http://blog.preinheimer.com)
상속: implements iXHProfRuns
파일 보기 프로젝트 열기: preinheimer/xhprof 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$prefix
$run_details

보호된 프로퍼티들

프로퍼티 타입 설명
$db Db_Abstract

공개 메소드들

메소드 설명
__construct ( $dir = null )
getDbClass ( )
getDistinct ( $data )
getHardHit ( array $criteria ) : resource Obtains the pages that have been the hardest hit over the past N days, utalizing the getRuns() method.
getNextAssoc ( $resultSet )
getRunComparativeData ( string $url, string $c_url ) : array Get comparative information for a given URL and c_url, this information will be used to display stats like how many calls a URL has, average, min, max execution time, etc. This information is pushed into the global namespace, which is horribly hacky.
getRuns ( array $stats ) : resource This function gets runs based on passed parameters, column data as key, value as the value. Values are escaped automatically. You may also pass limit, order by, group by, or "where" to add those values, all of which are used as is, no escaping.
getUrlStats ( array $data ) : resource Get stats (pmu, ct, wt) on a url or c_url
get_run ( string $run_id, mixed $type, mixed &$run_desc ) : mixed Retreives a run from the database,
save_run ( string $xhprof_data, mixed $type, string $run_id = null, mixed $xhprof_details = null ) : string Save the run in the database.

보호된 메소드들

메소드 설명
calculatePercentile ( $details )
db ( )

비공개 메소드들

메소드 설명
gen_run_id ( $type ) When setting the id column, consider the length of the prefix you're specifying in $this->prefix

메소드 상세

__construct() 공개 메소드

public __construct ( $dir = null )

calculatePercentile() 보호된 메소드

protected calculatePercentile ( $details )

db() 보호된 메소드

protected db ( )

getDbClass() 공개 정적인 메소드

public static getDbClass ( )

getDistinct() 공개 메소드

public getDistinct ( $data )

getHardHit() 공개 메소드

Obtains the pages that have been the hardest hit over the past N days, utalizing the getRuns() method.
public getHardHit ( array $criteria ) : resource
$criteria array An associative array containing, at minimum, type, days, and limit
리턴 resource The result set reprsenting the results of the query

getNextAssoc() 공개 정적인 메소드

public static getNextAssoc ( $resultSet )

getRunComparativeData() 공개 메소드

Get comparative information for a given URL and c_url, this information will be used to display stats like how many calls a URL has, average, min, max execution time, etc. This information is pushed into the global namespace, which is horribly hacky.
public getRunComparativeData ( string $url, string $c_url ) : array
$url string
$c_url string
리턴 array

getRuns() 공개 메소드

This function gets runs based on passed parameters, column data as key, value as the value. Values are escaped automatically. You may also pass limit, order by, group by, or "where" to add those values, all of which are used as is, no escaping.
public getRuns ( array $stats ) : resource
$stats array Criteria by which to select columns
리턴 resource

getUrlStats() 공개 메소드

Get stats (pmu, ct, wt) on a url or c_url
public getUrlStats ( array $data ) : resource
$data array An associative array containing the limit you'd like to set for the queyr, as well as either c_url or url for the desired element.
리턴 resource result set from the database query

get_run() 공개 메소드

Retreives a run from the database,
public get_run ( string $run_id, mixed $type, mixed &$run_desc ) : mixed
$run_id string unique identifier for the run being requested
$type mixed
$run_desc mixed
리턴 mixed

save_run() 공개 메소드

Save the run in the database.
public save_run ( string $xhprof_data, mixed $type, string $run_id = null, mixed $xhprof_details = null ) : string
$xhprof_data string
$type mixed
$run_id string
$xhprof_details mixed
리턴 string

프로퍼티 상세

$db 보호되어 있는 프로퍼티

protected Db_Abstract $db
리턴 Db_Abstract

$prefix 공개적으로 프로퍼티

public $prefix

$run_details 공개적으로 프로퍼티

public $run_details