PHP 클래스 Xhgui_Profiles, xhgui

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

보호된 프로퍼티들

프로퍼티 타입 설명
$_collection
$_mapper

공개 메소드들

메소드 설명
__construct ( MongoDb $db )
get ( string $id ) : Xhgui_Profile Get a single profile run by id.
getAll ( array $options = [] ) : array Get a paginated set of results.
getAvgsForUrl ( string $url, array $search = [] ) : array Get the Average metrics for a URL
getForUrl ( string $url, array $options, array $conditions = [] ) : MongoCursor Get the list of profiles for a simplified url.
getPercentileForUrl ( integer $percentile, string $url, array $search = [] ) : array Get the Percentile metrics for a URL
insert ( array $profile ) Insert a profile run.
latest ( ) : Xhgui_Profile Get the latest profile data.
paginate ( $options )
query ( $conditions, $fields = null )
truncate ( ) : boolean Used to truncate a collection.

보호된 메소드들

메소드 설명
_wrap ( array | MongoCursor $data ) : Xhgui_Profile | array Converts arrays + MongoCursors into Xhgui_Profile instances.

메소드 상세

__construct() 공개 메소드

public __construct ( MongoDb $db )
$db MongoDb

_wrap() 보호된 메소드

Converts arrays + MongoCursors into Xhgui_Profile instances.
protected _wrap ( array | MongoCursor $data ) : Xhgui_Profile | array
$data array | MongoCursor The data to transform.
리턴 Xhgui_Profile | array The transformed/wrapped results.

get() 공개 메소드

Get a single profile run by id.
public get ( string $id ) : Xhgui_Profile
$id string The id of the profile to get.
리턴 Xhgui_Profile

getAll() 공개 메소드

Get a paginated set of results.
public getAll ( array $options = [] ) : array
$options array The find options to use.
리턴 array An array of result data.

getAvgsForUrl() 공개 메소드

This will group data by date and returns only the avg + date, making the data ideal for time series graphs
public getAvgsForUrl ( string $url, array $search = [] ) : array
$url string
$search array Search options containing date_start and or date_end
리턴 array Array of metrics grouped by date

getForUrl() 공개 메소드

Get the list of profiles for a simplified url.
public getForUrl ( string $url, array $options, array $conditions = [] ) : MongoCursor
$url string The url to load profiles for.
$options array Pagination options to use.
$conditions array The search options.
리턴 MongoCursor

getPercentileForUrl() 공개 메소드

This will group data by date and returns only the percentile + date, making the data ideal for time series graphs
public getPercentileForUrl ( integer $percentile, string $url, array $search = [] ) : array
$percentile integer The percentile you want. e.g. 90.
$url string
$search array Search options containing date_start and or date_end
리턴 array Array of metrics grouped by date

insert() 공개 메소드

Does unchecked inserts.
public insert ( array $profile )
$profile array The profile data to save.

latest() 공개 메소드

Get the latest profile data.
public latest ( ) : Xhgui_Profile
리턴 Xhgui_Profile

paginate() 공개 메소드

public paginate ( $options )

query() 공개 메소드

public query ( $conditions, $fields = null )

truncate() 공개 메소드

Primarly used in test cases to reset the test db.
public truncate ( ) : boolean
리턴 boolean

프로퍼티 상세

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

protected $_collection

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

protected $_mapper