RomânăEnglish
 
exteon.ro - Manual
4.2. Functions

There are only two functions needed to profile php script using web3tracer:

 

void web3tracer_enable ( mixed $options )

This function starts logging (tracing) the function calls.

 

Parameters:

$options - an associative array of options: possible keys are:

bool separateCompileFunc

if set to true, a generic compile function call will be added to enclose all compile functions, so you can account for the overall compile time

 

Return value:

none

 

mixed web3tracer_disable( int $output_format, string $output_file=null )

The function stops the PHP profiler from tracing the calls, generates and writes the output data to a file.

 

Parameters:

$output_format - Specifies the output format for the trace file. The possible values are listed in the "Predefined constants" section of the manual.

$output_file - Specifies the output file name, using regular php path conventions. Only needed if the output format is WEB3TACER_OUTPUT_XT, since this writes the file directly to disk.

 

Return value:

If the output format is WEB3TRACER_OUTPUT_PROCESSED, the return will be the processed call graph array on success, or one of the error codes defined in the predefined constants section.

The function returns WEB3TRACER_OK (always 0) on success if the output format is WEB3TRACER_OUTPUT_XT. Otherwise, it returns one of the error constants mentioned above.

 

Notes:

This function must always be called in the same function (or on the main execution line) as web3tracer_enable.

 

void web3tracer_tag( string $tag )

Adds a "tag" in the execution of the script. A "tag" is a virtual function call that serves the convenience of splitting a function into proflable sections. Whenever the function is calles, a new node is added to the call tree, with the name $tag. The tag is automatically closed when the calling function ends (a tag cannot span accross functions), when web3tracer_tag is called again or, obviously, when web3tracer_endTag is called.

 

Parameters:

$tag - Name for the tag node.

 

Return value:

none

 

void web3tracer_endTag()

Ends the tag previously started by web3tracer_tag.

 

Parameters:

none

 

Return value:

none

 

(c) SC EXTEON SRL 2006-2009, All Rights Reserved
Powered by   Web3 CMS