AloFramework documentation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • Alo
    • Cache
    • CLI
    • Controller
    • Db
      • Query
    • Exception
    • FileSystem
    • Session
    • Traversables
    • Validators
    • Windows
  • Controller
  • None
  • PHP

Classes

  • Cookie
  • Cron
  • Curl
  • Email
  • Format
  • Handler
  • Locale
  • Profiler
  • Security
  • SFTP

Class Profiler

A code profiling class

Namespace:Alo
Author:Art <a.molcanovas@gmail.com>
Located atsys/class/alo/profiler.php

Methods summary

public
#__construct( )

Instantiates the class

Instantiates the class

Author

Art <a.molcanovas@gmail.com>
public staticAlo\Profiler
#profiler( )

Instantiates the class

Instantiates the class

Returns

Alo\Profiler

Author

Art <a.molcanovas@gmail.com>
publicAlo\Profiler
#mark(string$identifier)

Sets a profiler mark

Sets a profiler mark

Parameters

$identifier
string
$identifier How to identify this mark

Returns

Alo\Profiler

Author

Art <a.molcanovas@gmail.com>
public float
#timeBetween(string$firstMark,string$secondMark)

Returns absolute microtime difference between the two marks

Returns absolute microtime difference between the two marks

Parameters

$firstMark
string
$firstMark The first mark identifier
$secondMark
string
$secondMark The second mark identifier

Returns

float

Throws

Alo\Exception\ProfilerException
When one of the marks cannot be found

Author

Art <a.molcanovas@gmail.com>
public array
#diff(string$firstMark,string$secondMark)

Returns the difference between the two marks, i.e. all key/value pairs in $secondMark that differ from those of $firstMark

Returns the difference between the two marks, i.e. all key/value pairs in $secondMark that differ from those of $firstMark

Parameters

$firstMark
string
$firstMark The first mark identifier
$secondMark
string
$secondMark The second mark identifier

Returns

array

Throws

Alo\Exception\ProfilerException
When one of the marks cannot be found

Author

Art <a.molcanovas@gmail.com>
public array
#diffOnKey(string$key,string$firstMark,string$secondMark)

Shows the diff on the specified key

Shows the diff on the specified key

Parameters

$key
string
$key The key
$firstMark
string
$firstMark The first mark
$secondMark
string
$secondMark The second mark

Returns

array

Throws

Alo\Exception\ProfilerException
If the key isn't found in one or both marks

Author

Art <a.molcanovas@gmail.com>
public array
#getMarks( )

Returns the marks set, as well as their data

Returns the marks set, as well as their data

Returns

array

Magic methods summary

Constants summary

stringP_MICROTIME'microtime'
#

Defines a parameter as "microtime"

Defines a parameter as "microtime"

stringP_SESSION_DATA'session_data'
#

Defines a parameter as "session data"

Defines a parameter as "session data"

stringP_GET'$_GET'
#

Defines a parameter as "$_GET data set"

Defines a parameter as "$_GET data set"

stringP_POST'$_POST'
#

Defines a parameter as "$_POST data set"

Defines a parameter as "$_POST data set"

stringP_FILES'$_FILES'
#

Defines a parameter as "$_FILES data set"

Defines a parameter as "$_FILES data set"

stringP_CONTROLLER'controller'
#

Defines a parameter as "controller in use"

Defines a parameter as "controller in use"

stringP_CONTROLLER_METHOD'controller_method'
#

Defines a parameter as "controller method in use"

Defines a parameter as "controller method in use"

stringP_PORT'port'
#

Defines a parameter as "port in use"

Defines a parameter as "port in use"

stringP_REMOTE_ADDR'remote_addr'
#

Defines a parameter as "request IP"

Defines a parameter as "request IP"

stringP_REQUEST_METHOD'request_method'
#

Defines a parameter as "request method"

Defines a parameter as "request method"

stringP_REQUEST_SCHEME'request_scheme'
#

Defines a parameter as "request scheme"

Defines a parameter as "request scheme"

stringP_SERVER_ADDR'server_addr'
#

Defines a parameter as "server internal IP"

Defines a parameter as "server internal IP"

stringP_SERVER_NAME'server_name'
#

Defines a parameter as "server name"

Defines a parameter as "server name"

stringP_HEADERS'headers'
#

Defines a parameter as "Request headers set"

Defines a parameter as "Request headers set"

stringP_REQUEST_PATH'request_path'
#

Defines a parameter as "request path"

Defines a parameter as "request path"

stringP_MEMORY_USAGE'memory_usage'
#

Defines a parameter as "memory allocated to PHP script via emalloc()"

Defines a parameter as "memory allocated to PHP script via emalloc()"

stringP_REAL_MEMORY_USAGE'real_memory_usage'
#

Defines a parameter as "real memory allocated to PHP script"

Defines a parameter as "real memory allocated to PHP script"

stringP_DIFF'_diff'
#

Defines a parameter as "diff"

Defines a parameter as "diff"

Properties summary

public staticAlo\Profiler$this
#

Static reference to the last instance of the class

Static reference to the last instance of the class

protected array$marks
#

Marks set

Marks set

AloFramework documentation API documentation generated byApiGen 2.8.0