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

Namespaces

  • Alo
    • Cache
    • Controller
    • Db
    • Exception
    • Session
    • Statics
    • Test
    • Validators
  • Controller
  • None
  • PHP

Classes

  • Cron
  • cURL
  • Email
  • File
  • Handler
  • Profiler
  • SFTP

Class Profiler

A code profiling class

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

Methods summary

public
# __construct( )

Instantiates the class

Instantiates the class

Author

Art <a.molcanovas@gmail.com>
public Alo\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 $first_mark, string $second_mark )

Returns absolute microtime difference between the two marks

Returns absolute microtime difference between the two marks

Parameters

$first_mark
string
$first_mark The first mark identifier
$second_mark
string
$second_mark 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 $first_mark, string $second_mark )

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

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

Parameters

$first_mark
string
$first_mark The first mark identifier
$second_mark
string
$second_mark 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
# diff_on_key( string $key, string $first_mark, string $second_mark )

Shows the diff on the specified key

Shows the diff on the specified key

Parameters

$key
string
$key The key
$first_mark
string
$first_mark The first mark
$second_mark
string
$second_mark 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

string P_MICROTIME 'microtime'
#

Defines a parameter as "microtime"

Defines a parameter as "microtime"

string P_SESSION_DATA 'session_data'
#

Defines a parameter as "session data"

Defines a parameter as "session data"

string P_GET '$_GET'
#

Defines a parameter as "$_GET data set"

Defines a parameter as "$_GET data set"

string P_POST '$_POST'
#

Defines a parameter as "$_POST data set"

Defines a parameter as "$_POST data set"

string P_FILES '$_FILES'
#

Defines a parameter as "$_FILES data set"

Defines a parameter as "$_FILES data set"

string P_CONTROLLER 'controller'
#

Defines a parameter as "controller in use"

Defines a parameter as "controller in use"

string P_CONTROLLER_METHOD 'controller_method'
#

Defines a parameter as "controller method in use"

Defines a parameter as "controller method in use"

string P_PORT 'port'
#

Defines a parameter as "port in use"

Defines a parameter as "port in use"

string P_REMOTE_ADDR 'remote_addr'
#

Defines a parameter as "request IP"

Defines a parameter as "request IP"

string P_REQUEST_METHOD 'request_method'
#

Defines a parameter as "request method"

Defines a parameter as "request method"

string P_REQUEST_SCHEME 'request_scheme'
#

Defines a parameter as "request scheme"

Defines a parameter as "request scheme"

string P_SERVER_ADDR 'server_addr'
#

Defines a parameter as "server internal IP"

Defines a parameter as "server internal IP"

string P_SERVER_NAME 'server_name'
#

Defines a parameter as "server name"

Defines a parameter as "server name"

string P_HEADERS 'headers'
#

Defines a parameter as "Request headers set"

Defines a parameter as "Request headers set"

string P_REQUEST_PATH 'request_path'
#

Defines a parameter as "request path"

Defines a parameter as "request path"

string P_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()"

string P_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"

string P_DIFF '_diff'
#

Defines a parameter as "diff"

Defines a parameter as "diff"

Properties summary

protected array $marks
#

Marks set

Marks set

AloFramework documentation API documentation generated by ApiGen 2.8.0