Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/xhprof/xhprof_lib/utils/callgraph_utils.php File Reference

Go to the source code of this file.

Functions

 xhprof_http_header ($name, $value)
 xhprof_generate_mime_header ($type, $length)
 xhprof_generate_image_by_dot ($dot_script, $type)
 xhprof_get_children_table ($raw_data)
 xhprof_generate_dot_script ($raw_data, $threshold, $source, $page, $func, $critical_path, $right=null, $left=null)
 xhprof_render_diff_image ($xhprof_runs_impl, $run1, $run2, $type, $threshold, $source)
 xhprof_get_content_by_run ($xhprof_runs_impl, $run_id, $type, $threshold, $func, $source, $critical_path)
 xhprof_render_image ($xhprof_runs_impl, $run_id, $type, $threshold, $func, $source, $critical_path)

Variables

 $xhprof_legal_image_types

Function Documentation

xhprof_generate_dot_script ( raw_data,
threshold,
source,
page,
func,
critical_path,
right = null,
left = null 
)

Generate DOT script from the given raw phprof data.

Parameters:
raw_data,phprofprofile data.
threshold,float,thethreshold value [0,1). The functions in the raw_data whose exclusive wall times ratio are below the threshold will be filtered out and won't apprear in the generated image.
page,string(optional),theroot node name. This can be used to replace the 'main()' as the root node.
func,string,thefocus function.
critical_path,bool,whetheror not to display critical path with bold lines.
Returns:
, string, the DOT script to generate image.
Author:
cjiang

Definition at line 167 of file callgraph_utils.php.

Here is the call graph for this function:

Here is the caller graph for this function:

xhprof_generate_image_by_dot ( dot_script,
type 
)

Generate image according to DOT script. This function will spawn a process with "dot" command and pipe the "dot_script" to it and pipe out the generated image content.

Parameters:
dot_script,string,thescript for DOT to generate the image.
type,oneof the supported image types, see $xhprof_legal_image_types.
Returns:
, binary content of the generated image on success. empty string on failure.
Author:
cjiang

Definition at line 96 of file callgraph_utils.php.

Here is the caller graph for this function:

xhprof_generate_mime_header ( type,
length 
)

Genearte and send MIME header for the output image to client browser.

Author:
cjiang

Definition at line 60 of file callgraph_utils.php.

Here is the call graph for this function:

Here is the caller graph for this function:

xhprof_get_children_table ( raw_data)

Definition at line 137 of file callgraph_utils.php.

Here is the call graph for this function:

Here is the caller graph for this function:

xhprof_get_content_by_run ( xhprof_runs_impl,
run_id,
type,
threshold,
func,
source,
critical_path 
)

Generate image content from phprof run id.

Parameters:
object$xhprof_runs_implAn object that implements the iXHProfRuns interface
run_id,integer,theunique id for the phprof run, this is the primary key for phprof database table.
type,string,oneof the supported image types. See also $xhprof_legal_image_types.
threshold,float,thethreshold value [0,1). The functions in the raw_data whose exclusive wall times ratio are below the threshold will be filtered out and won't apprear in the generated image.
func,string,thefocus function.
Returns:
, string, the DOT script to generate image.
Author:
cjiang

Definition at line 435 of file callgraph_utils.php.

Here is the call graph for this function:

Here is the caller graph for this function:

xhprof_http_header ( name,
value 
)

Send an HTTP header with the response. You MUST use this function instead of header() so that we can debug header issues because they're virtually impossible to debug otherwise. If you try to commit header(), SVN will reject your commit.

Parameters:
stringHTTP header name, like 'Location'
stringHTTP header value, like 'http://www.example.com/'

Definition at line 41 of file callgraph_utils.php.

Here is the call graph for this function:

Here is the caller graph for this function:

xhprof_render_diff_image ( xhprof_runs_impl,
run1,
run2,
type,
threshold,
source 
)

Definition at line 394 of file callgraph_utils.php.

Here is the call graph for this function:

xhprof_render_image ( xhprof_runs_impl,
run_id,
type,
threshold,
func,
source,
critical_path 
)

Generate image from phprof run id and send it to client.

Parameters:
object$xhprof_runs_implAn object that implements the iXHProfRuns interface
run_id,integer,theunique id for the phprof run, this is the primary key for phprof database table.
type,string,oneof the supported image types. See also $xhprof_legal_image_types.
threshold,float,thethreshold value [0,1). The functions in the raw_data whose exclusive wall times ratio are below the threshold will be filtered out and won't apprear in the generated image.
func,string,thefocus function.
bool,doesthis run correspond to a PHProfLive run or a dev run?
Author:
cjiang

Definition at line 471 of file callgraph_utils.php.

Here is the call graph for this function:


Variable Documentation

$xhprof_legal_image_types
Initial value:
 array(
    "jpg" => 1,
    "gif" => 1,
    "png" => 1,
    "ps"  => 1,
    )

Definition at line 24 of file callgraph_utils.php.

 All Data Structures Namespaces Files Functions Variables Enumerations