- Symphony 2.3.1
-
› assets
11 -
› boot
9 -
› core
22 -
› cryptography
4 -
› email-gateways
3 -
› interface
6 -
› toolkit
72 -
› Unknown
38 - Delegates91
- Deprecated28
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class Profiler
class.profiler.php #13The Profiler class tracks various performance metrics while a Symphony page is being generated. It provides a basic stopwatch functionality and memory usage statistics. Profiling occurs in both the Frontend and Administration execution. The Profiler implements the Singleton interface.
Methods
static Profiler instance()
Returns the Profiler instance, creating one if it does not exist
array retrieve(
$index)
Given an index, return the sample at that position otherwise just return all samples.
Parameters
Returns
If no $index
is passed an array of all the sample arrays are returned otherwise just the sample at the given $index
will be returned.
array retrieveByMessage(
$msg)
Returns a sample by message, if no sample is found, an empty array is returned
Parameters
array retrieveGroup(
$group)
Returns all the samples that belong to a particular group.
static array retrieveLast()
Returns the last record from the $_records
array
integer retrieveTotalMemoryUsage()
Returns the total memory usage from all samples taken by comparing each sample to the base memory sample.
Returns
Memory usage in bytes.
integer retrieveTotalRunningTime()
Returns the difference between when the Profiler was initialised
(aka $_starttime
) and the last record the Profiler has.
void sample(
$msg, $type, $group, $queries)
This function creates a new report in the $_samples
array where the message
is the name of this report. By default, all samples are compared to the $_starttime
but if the PROFILE_LAP
constant is passed, it will be compared to specific $_seed
timestamp. Samples can grouped by type (ie. Datasources, Events), but by default
are grouped by 'General'. Optionally, the number of SQL queries that have occurred
since either $_starttime
or $_seed
can be passed. Memory usage is taken with each
sample which measures the amount of memory used by this script by PHP at the
time of sampling.
Parameters
static void seed(
$time)
Sets the seed to be a timestamp so that time profiling will use this as a starting point