Property | Type | Description | |
---|---|---|---|
$criticalQueryThreshold | the threshold for determining whether the request has involved critical number of DB queries. If the number of queries exceeds this number, the execution is considered taking critical number of DB queries. | ||
$db | the name of the database component to use for executing (explain) queries | ||
$defaultFilter | the default filter to apply to the database queries. In the format of [ property => value ], for example: [ 'type' => 'SELECT' ] | ||
$defaultOrder | the default ordering of the database queries. In the format of [ property => sort direction ], for example: [ 'duration' => SORT_DESC ] |
Method | Description | |
---|---|---|
calculateTimings ( ) : array | Calculates given request profile timings. | |
canBeExplained ( string $type ) : boolean | Check if given query type can be explained. | |
getDb ( ) : |
Returns a reference to the DB component associated with the panel | |
getDetail ( ) | ||
getName ( ) | ||
getProfileLogs ( ) : array | Returns all profile logs of the current request for this panel. It includes categories such as: 'yii\db\Command::query', 'yii\db\Command::execute'. | |
getSummary ( ) | ||
getSummaryName ( ) : string | ||
getTypes ( ) : array | Returns array query types | |
init ( ) | ||
isQueryCountCritical ( integer $count ) : boolean | Check if given queries count is critical according settings. | |
save ( ) |
Method | Description | |
---|---|---|
getModels ( ) : array | Returns an array of models that represents logs of the current request. | |
getQueryType ( string $timing ) : string | Returns database query type. | |
getTotalQueryTime ( array $timings ) : integer | Returns total query time. | |
hasExplain ( ) : boolean |
public calculateTimings ( ) : array | ||
return | array | timings [token, category, timestamp, traces, nesting level, elapsed time] |
public static canBeExplained ( string $type ) : boolean | ||
$type | string | query type |
return | boolean |
public getDb ( ) : |
||
return |
public getProfileLogs ( ) : array | ||
return | array |
protected getQueryType ( string $timing ) : string | ||
$timing | string | timing procedure string |
return | string | query type such as select, insert, delete, etc. |
public getSummaryName ( ) : string | ||
return | string | short name of the panel, which will be use in summary. |
protected getTotalQueryTime ( array $timings ) : integer | ||
$timings | array | |
return | integer | total time |
protected hasExplain ( ) : boolean | ||
return | boolean | Whether the DB component has support for EXPLAIN queries |
public isQueryCountCritical ( integer $count ) : boolean | ||
$count | integer | queries count |
return | boolean |
public $criticalQueryThreshold |
public $db |
public $defaultFilter |