Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 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.

Located in /joomla/utilities/profiler.php (line 28)

Class JObject   (Subpackage Base)

Class JProfiler   (Subpackage Utilities)
Variable Summary
Variable array $_buffer
Variable string $_prefix
Variable int $_start
Method Summary
Constructor JProfiler __construct ([string $prefix = ''])
Method array getBuffer ()
Method JProfiler &getInstance ([string $prefix = ''])
Method int getMemory ()
Method float getmicrotime ()
Method string mark (string $label)
Variables
array $_buffer = null (line 46)
string $_prefix = '' (line 40)
int $_start = 0 (line 34)
Methods
Constructor __construct (line 54)

Constructor

  • access: protected
JProfiler __construct ([string $prefix = ''])
  • string $prefix: Prefix for mark messages

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
getBuffer (line 162)

Get all profiler marks.

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

  • return: Array of profiler marks
  • access: public
array getBuffer ()
getInstance (line 72)

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

This method must be invoked as:

  $browser = & JProfiler::getInstance( $prefix );

  • return: The Profiler object.
  • access: public
JProfiler &getInstance ([string $prefix = ''])
  • string $prefix: Prefix used to distinguish profiler objects.
getMemory (line 123)

Get information about current memory usage.

int getMemory ()
getmicrotime (line 110)

Get the current time.

  • return: The current time
  • access: public
float getmicrotime ()
mark (line 97)

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
  • access: public
string mark (string $label)
  • string $label: A label for the time mark

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getPublicProperties()
 JObject::set()
 JObject::toString()

Documentation generated on Mon, 05 Mar 2007 21:19:13 +0000 by phpDocumentor 1.3.1