Class Profiler
Profiler class.
This class works as processing the data for profiler such as gather things (input, file, sessions), get micro time.
This class also display the profiling result and dump the data for check or tests.
-
Rundiz\Profiler\ProfilerBase
-
Rundiz\Profiler\Profiler
Methods summary
public
|
|
public
integer
|
#
countTotalLogType( string $logtype )
Count total log type in the "Logs" section.
Count total log type in the "Logs" section.
Parameters
- $logtype
- Accept debug, info, notice, warning, error, critical, alert, emergency. referrer: http://www.php-fig.org/psr/psr-3/
Returns
integer Return counted total log type in the "Logs" section.
|
public
string
|
#
display( $dbh = '', $display_db_function = '' )
display the profiler data results.
display the profiler data results.
Returns
string return the profiler result in html.
|
public
array
|
#
dumptest( )
for checking only.
Returns
array
|
public
|
#
gatherAll( )
gather all data before call display. this can be done automatically if you just call display().
gather all data before call display. this can be done automatically if you just call display().
|
public
string
|
#
getReadableFileSize( integer $size, string $retstring = null )
get readable file size.
copy from php quick profiler
get readable file size.
copy from php quick profiler
Parameters
Returns
string
|
public
float
|
#
getMicrotime( boolean $at_start = false )
get microtime.
Parameters
- $at_start
- set to true if this microtime is get at the very beginning of the app. this can allow newer php version to use $_SERVER['REQUEST_TIME_FLOAT'];
Returns
float microtime in float.
|
public
string
|
#
getReadableTime( integer $time )
get readable time.
copy from php quick profiler
get readable time.
copy from php quick profiler
Parameters
Returns
string
|
public
string
|
#
summaryMatchKey( string $section, string $matchKey, integer $sectionKey )
Summary start and end of match key in a section.
Summary start and end of match key in a section.
Parameters
- $section
- The section name.
- $matchKey
- The match key in that section.
- $sectionKey
- The array index key of the section for check while displaying in the loop.
Returns
string Return the readable result if found 2 match key and can summary. Return empty string if not found.
|