Static Public Member Functions | Private Member Functions | Static Private Attributes
bdfProfiler Class Reference

Execution time/memory profiling class. More...

List of all members.

Static Public Member Functions

static mark ($msg=null)
 Marks a time.
static profile ()
 Returns profiling information as an array.
static output ($in_html=false)
 Return formatted profile information.
static html_output ()
 Return formatted profile information in HTML form.

Private Member Functions

 __construct ()
 Private constructor prevents direct creation of object.

Static Private Attributes

static $marks = array()
 This is an array that holds the markers.

Detailed Description

Execution time/memory profiling class.

This is a modification of the Solar_Debug_Timer class

Author:
Paul M. Jones <pmjones@solarphp.com>

Singleton class accessed via static methods

Example:


Constructor & Destructor Documentation

bdfProfiler::__construct ( ) [private]

Private constructor prevents direct creation of object.


Member Function Documentation

static bdfProfiler::html_output ( ) [static]

Return formatted profile information in HTML form.

Returns:
a string, containing an HTML table element with a series of rows; each containing the profile information for a marker. The table's class is "bdfProfiler_table".

Referenced by output().

static bdfProfiler::mark ( msg = null) [static]

Marks a time.

Parameters:
msgOptional string. A message to be displayed for this marker.
static bdfProfiler::output ( in_html = false) [static]

Return formatted profile information.

Returns:
a string, with a series of tab-delimited lines; each containing the profile information for a marker.
Parameters:
in_htmlIf true, the output is html. Default is false.
static bdfProfiler::profile ( ) [static]

Returns profiling information as an array.

Returns:
an array of associative arrays that contain the profiling information. Each sub-array represents the information from one marker.
  • 'num' An integer. The marker ID number
  • 'diff' A floating-point number. The number of seconds (at a millisecond resolution) between the last marker and this one.
  • 'total' A floating-point number. The total number of seconds (at a millisecond resolution) since the start marker.
  • 'memory' If possible, the memory consumption at the marker's point in execution.
  • 'msg' Any text message that was associated with the marker.

Referenced by html_output(), and output().


Member Data Documentation

bdfProfiler::$marks = array() [static, private]

This is an array that holds the markers.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations