Back to Joomla project (class list)

Class Profiler - list of methods

Utility class to assist in the process of benchmarking the execution of sections of code to understand where time is being spent.
Package: Joomla\CMS\Profiler
Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Profiler/Profiler.php
Project: Joomla

Method Summary

public
(mixed $prefix = '')

Constructor
Parameters
  • string $prefix Prefix for mark messages
Since
  • 1.7.0
Show source code of this method: __construct Source Code

public static \Joomla\CMS\Profiler\Profiler
(mixed $prefix = '')

Returns the global Profiler object, only creating it if it doesn't already exist.
Parameters
  • string $prefix Prefix used to distinguish profiler objects.
Returns
  • \Joomla\CMS\Profiler\Profiler The Profiler object.
Since
  • 1.7.0
Show source code of this method: getInstance Source Code

public string
(mixed $label)

Output a time mark
Parameters
  • string $label A label for the time mark
Returns
  • string
Since
  • 1.7.0
Show source code of this method: mark Source Code

public array
()

Get all profiler marks.
Returns
  • array Array of profiler marks
Since
  • 1.7.0
Show source code of this method: getMarks Source Code

public array
()

Get all profiler mark buffers.
Returns
  • array Array of profiler marks
Since
  • 1.7.0
Show source code of this method: getBuffer Source Code

public $this
(mixed $startTime = 0.0, mixed $startMem = 0)

Sets the start time.
Parameters
  • float $startTime Unix timestamp in microseconds for setting the Profiler start time.
  • int $startMem Memory amount in bytes for setting the Profiler start memory.
Returns
  • $this For chaining
Since
  • 3.0.0
Show source code of this method: setStart Source Code

Properties Summary

protected int
$start
Since
  • 3.0.0
protected string
$prefix
Since
  • 3.0.0
protected array
$buffer
Since
  • 3.0.0
protected array
$marks
Since
  • 3.0.0
protected float
$previousTime
Since
  • 3.0.0
protected float
$previousMem
Since
  • 3.0.0
protected static array
$instances
Since
  • 1.7.3

Tags Summary

Since
1.7.0