class Profiler
Profiler for Propel
Methods
__construct($slowTreshold = 0.1, $innerGlue = ': ', $outerGlue = ' | ') | ||
setSlowTreshold(integer $slowTreshold)
Set the duration which triggers the 'slow' label on details. |
||
setDetails(array $details)
Set the list of details to be included in a profile. |
||
setInnerGlue(string $innerGlue)
Set the inner glue for the details. |
||
setOuterGlue(string $outerGlue)
Set the outer glue for the details. |
||
setConfiguration(array $profilerConfiguration)
Configure the profiler from an array. |
||
array |
getConfiguration()
Get an array representing the configuration of the profiler. |
|
start() | ||
isSlow() | ||
getProfile() | ||
string |
getProfileBetween(array $startSnapshot, array $endSnapshot)
Returns a string that may be prepended to a log line, containing debug information according to the current configuration. |
|
static array |
getSnapshot()
Get a snapshot of the current time and memory consumption. |
|
static string |
formatMemory(integer $bytes, integer $precision = 3)
Format a byte count into a human-readable representation. |
|
static string |
formatDuration(double $duration, integer $precision = 3)
Format a duration into a human-readable representation. |
|
static float |
toPrecision(float $number, integer $significantFigures = 3)
Rounding to significant digits (sort of like JavaScript's toPrecision()). |
Details
at line 39
public
__construct($slowTreshold = 0.1, $innerGlue = ': ', $outerGlue = ' | ')
at line 51
public
setSlowTreshold(integer $slowTreshold)
Set the duration which triggers the 'slow' label on details.
at line 61
public
setDetails(array $details)
Set the list of details to be included in a profile.
at line 71
public
setInnerGlue(string $innerGlue)
Set the inner glue for the details.
at line 81
public
setOuterGlue(string $outerGlue)
Set the outer glue for the details.
at line 112
public
setConfiguration(array $profilerConfiguration)
Configure the profiler from an array.
at line 135
public array
getConfiguration()
Get an array representing the configuration of the profiler.
This array can be used as an input for self::setConfiguration().
at line 145
public
start()
at line 150
public
isSlow()
at line 155
public
getProfile()
at line 174
public string
getProfileBetween(array $startSnapshot, array $endSnapshot)
Returns a string that may be prepended to a log line, containing debug information according to the current configuration.
Uses two debug snapshots to calculate how much time has passed since the call to
self::start(), how much the memory consumption by PHP has changed etc.
at line 218
static public array
getSnapshot()
Get a snapshot of the current time and memory consumption.
at line 235
static public string
formatMemory(integer $bytes, integer $precision = 3)
Format a byte count into a human-readable representation.
at line 257
static public string
formatDuration(double $duration, integer $precision = 3)
Format a duration into a human-readable representation.
at line 278
static public float
toPrecision(float $number, integer $significantFigures = 3)
Rounding to significant digits (sort of like JavaScript's toPrecision()).