Class JProfiler

Description

Utility class to assist in the process of benchmarking the execution of sections of code to understand where time is being spent.

  • since: 11.1

Located in /libraries/joomla/profiler/profiler.php (line 20)


	
			
Variable Summary
 static array $instances
 array $buffer
 array $marks
 string $prefix
 float $previousMem
 integer $start
Method Summary
 static JProfiler getInstance ([string $prefix = ''])
 static float getmicrotime ()
 JProfiler __construct ([string $prefix = ''])
 array getBuffer ()
 array getMarks ()
 integer getMemory ()
 string mark (string $label)
Variables
static array $instances = array() (line 62)
  • var: JProfiler instances container.
  • since: 11.3
  • access: protected
array $buffer = null (line 38)
  • var: The buffer of profiling messages.
  • since: 12.1
  • access: protected
array $marks = null (line 44)
  • var: The profiling messages.
  • since: 12.1
  • access: protected
string $prefix = '' (line 32)
  • var: The prefix to use in the output
  • since: 12.1
  • access: protected
float $previousMem = 0.0 (line 56)
  • var: The previous memory marker
  • since: 12.1
  • access: protected
float $previousTime = 0.0 (line 50)
  • var: The previous time marker
  • since: 12.1
  • access: protected
integer $start = 0 (line 26)
  • var: The start time.
  • since: 12.1
  • access: protected
Methods
static getInstance (line 89)

Returns the global Profiler object, only creating it if it doesn't already exist.

  • return: The Profiler object.
  • since: 11.1
  • access: public
static JProfiler getInstance ([string $prefix = ''])
  • string $prefix: Prefix used to distinguish profiler objects.
static getmicrotime (line 151)

Get the current time.

  • return: The current time
  • deprecated: 12.3 (Platform) & 4.0 (CMS) - Use PHP's microtime(1)
  • since: 11.1
  • access: public
static float getmicrotime ()
Constructor __construct (line 71)

Constructor

  • since: 11.1
  • access: public
JProfiler __construct ([string $prefix = ''])
  • string $prefix: Prefix for mark messages
getBuffer (line 197)

Get all profiler mark buffers.

Returns an array of all mark buffers created since the Profiler object was instantiated. Marks are strings as per JProfiler::mark().

  • return: Array of profiler marks
  • since: 11.1
  • access: public
array getBuffer ()
getMarks (line 182)

Get all profiler marks.

Returns an array of all marks created since the Profiler object was instantiated. Marks are objects as per JProfiler::mark().

  • return: Array of profiler marks
  • since: 11.1
  • access: public
array getMarks ()
getMemory (line 167)

Get information about current memory usage.

integer getMemory ()
mark (line 111)

Output a time mark

The mark is returned as text enclosed in <div> tags with a CSS class of 'profiler'.

  • return: Mark enclosed in <div> tags
  • since: 11.1
  • access: public
string mark (string $label)
  • string $label: A label for the time mark

Documentation generated on Tue, 19 Nov 2013 15:11:21 +0100 by phpDocumentor 1.4.3