Class AMysql_Profiler
This class is so that you could access the query profile data within your view containing the information on the latest queries without having to pass the entire AMysql object onto the view.
The problem with simply calling $amysql->getQueriesData() is that you may be using a framework that doesn't allow you to set a hook for after resolving the controllers, but before rendering a view. With this class, you can just fetch it by $amysql->getProfiler(), assign it to view, and access the latest profiler data with $profiler['queriesData'] and $profiler['totalTime'].
Enable the profiler by setting the AMysql object's profileQueries proterty to true.
- AMysql_Profiler implements ArrayAccess
Author: Szerémi Attila
Located at AMysql/Profiler.php
public
|
|
public
string
|
|
public
array
|
#
getAsArray( )
Gets the profile data as an array. Can also be called with the help of ArrayAccess via $this['asArray'] |
public
|
|
public
mixed
|
|
public
array
|
#
getQueries( )
Gets the list of SQL queries performed so far by AMysql_Statement objects connected by this object. |
public
array[]
|
#
getQueriesData( )
Returns an arrays of profiled query data. Each value is an array that
consists of: |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
protected
mixed
|
$amysql |
|
|
protected
float
|
$totalTime | 0.0 |
#
The total time all the queries have taken so far. |
protected
array
|
$queries | array() |
|
protected
array
|
$queriesData | array() |