xplo.re Medusa Core Framework 3.2
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
      • Driver
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Fault
      • Formatter
        • Driver
      • Incident
        • Exception
      • Reporter
        • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • Type
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • Authentication
  • Authentication_Token
  • AutoLoader
  • Cache
  • Charset
  • ClassDescriptor
  • Closure
  • Configuration
  • Controller
  • Converter
  • Date
  • Decoder
  • Delegate
  • Dispatcher
  • Encoder
  • Env
  • Env_Field
  • Env_File
  • Env_FileList
  • Env_Request
  • Env_SERVER
  • Exchange
  • Fault
  • Field
  • Filter
  • Filter_Value
  • Formatter
  • Hash
  • IP
  • Loader
  • Locale
  • Locale_Node
  • Log
  • Module
  • Module_Iterator
  • Nothing
  • Object
  • OS
  • Plugin
  • Profiler
  • Query
  • Registry
  • Resource
  • Server
  • Session
  • Session_Token
  • Set
  • Storage
  • Storage_Result
  • Storage_Statement
  • Stream
  • Translation
  • URI
  • URI_Parameters
  • UUID
  • Value
  • Version
  • View

Interfaces

  • Accessor
  • Chainable
  • Comparable
  • Configurable
  • Equality
  • Identity
  • Inquiry
  • Masquerade
  • Mutator
  • SeekableStream
  • Storable
  • Variator

Exceptions

  • Exception

Constants

  • Copyright
  • ProductName
  • Version

Class Profiler

Profiler take snapshots of runtime and overall memory footprint.

Profiler instances can be named and are accessed via the Core\Profiler::instance() method. A default instance with the name given by the constant Profiler::CoreProfile is used by the framework to measure it's own boot time and memory footprint, if configured accordingly. If the default instance is used for additional measurements, state names should not start with a colon (":") to avoid collisions with framework-internal state names.

The profiler does not inherit from Core\Object and does not support KVC access. This allows the profiler to be used at early boot stages where no other modules have yet been loaded. Access to properties is manually implemented to emulate KVC usage.

Namespace: Core
Package: Core
Since: 3.0
Requires: PHP 5.3
Version: 1.0
Located at Profiler.inc.php

Methods summary

public
# __construct( )

Profiler constructor.

Profiler constructor.

Since

3.0
public mixed
# __get( string $key )

Getter method for magic properties to emulate KVC access.

Getter method for magic properties to emulate KVC access.

Parameters

$key
Name of property to access.

Returns

mixed
Value of property with given name.

Throws

Core\Exception\UndefinedKey
A property with the given name does not exist.

Since

3.0
public static Core\Profiler
# instance( string $profileName )

Returns the profiler instance of the given name.

Returns the profiler instance of the given name.

Parameters

$profileName
Name of profiler instance to retrieve.

Returns

Core\Profiler

Since

3.0
public array
# memState( string $stateName, string $compareStateName = null )

Sets a new named memory state or returns the difference between two named states.

Sets a new named memory state or returns the difference between two named states.

Parameters

$stateName

State name to create new checkpoint for and/or to compare with. A new checkpoint is automatically created if no checkpoint with the given state name exists.

$compareStateName
Name of state to compare to first state.

Returns

array

Returns state data or, if a second state name for comparison was given, the absolute difference between both state values. If the state name for comparison is not valid, null is returned instead.

Since

3.0
public float
# timeState( string $stateName, string $compareStateName = null )

Sets a new named time state or returns the difference between two named states.

Sets a new named time state or returns the difference between two named states.

Parameters

$stateName

State name to create new checkpoint for and/or to compare with. A new checkpoint is automatically created if no checkpoint with the given state name exists.

$compareStateName
Name of state to compare to first state.

Returns

float

Returns state data or, if a second state name for comparison was given, the absolute difference between both state values. If the state name for comparison is not valid, null is returned instead.

Since

3.0

Constants summary

string CoreProfile

Name of profiler used for internal measurements.

Name of profiler used for internal measurements.

Since

3.0
# '__xc'
string CoreBootState

State name for the core boot initialisation timestamp.

State name for the core boot initialisation timestamp.

Since

3.0
# ':core-boot'
string CoreLoadState

State name for the timestamp after core startup is finished.

State name for the timestamp after core startup is finished.

Since

3.0
# ':core-load'
integer MicroTimeMethod

Uses micro-time measurement to get time states. Default method.

Uses micro-time measurement to get time states. Default method.

Since

3.0
# 0x1

Properties summary

protected array $_memStates

Associative array of stored memory states.

Associative array of stored memory states.

Since

3.0
#
protected array $_timeStates

Associative array of stored time states.

Associative array of stored time states.

Since

3.0
#
protected integer $_timeMethod

Current time measurement method.

Current time measurement method.

Since

3.0
#

Magic properties

public read-only array $memStates

Associative array of stored memory states.

public read-only array $timeStates

Associative array of stored time states.

public read-only integer $timeMethod

Current time measurement method.

xplo.re Medusa Core Framework 3.2 API documentation generated by ApiGen