include/SugarXHprof/SugarXHprof.php
\SugarXHprof
Package: SugarCRM
Class allows us to use XHprof for profiling To enable profiling you should add next properties to config_override.php
- See
- \SugarXHprof::$enable
- See
- \SugarXHprof::$manager
- See
- \SugarXHprof::$log_to
- See
- \SugarXHprof::$sample_rate
- See
- \SugarXHprof::$ignored_functions
- See
- \SugarXHprof::$flags
Properties
bool
$enable= 'false'
staticenable profiler or not, it will be disabled by some reasons
Default value
false
Details- Type
- bool
- See
- \SugarXHprof::loadConfig()
int
$flags= '0'
staticflags for xhprof
Default value
0
Details- Type
- int
- See
- \http://www.php.net/manual/xhprof.constants.php
array
$ignored_functions= 'array()'
staticarray of function names to ignore from the profile (pass into xhprof_enable)
Default value
array()
Details- Type
- array
\SugarXHprof
$instance= 'null'
staticinstance of profiler
Default value
null
Details- Type
- \SugarXHprof
string
$log_to= ''''
staticpath to directory for logs, if log_to is empty then xhprof.output_dir be used
Default value
''
Details- Type
- string
string
$manager= '__CLASS__'
staticclass of manager for customization, has to extend from SugarXHprof class
Default value
__CLASS__
Details- Type
- string
bool
$registered= 'false'
Because of unregister_shutdown_function is not present in php we have to skip calls of 'end' method if that property equals to false
is shutdown function registered or not
Default value
false
Details- Type
- bool
Methods
detectAction(
)
:
string
static
Method tries to detect entryPoint, service, module & action and returns it as string
Returns
Type | Description |
---|---|
string | action |
getInstance(
)
:
\SugarXHprof
static
Tries to load custom profiler. If it doesn't exist then use itself
Returns
Type | Description |
---|---|
\SugarXHprof |