Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

(no description)

File Size: 490 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions


Functions that are not part of a class:

xhprof_http_header($name, $value)   X-Ref
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.

param: string  HTTP header name, like 'Location'
param: string  HTTP header value, like 'http://www.example.com/'

xhprof_generate_mime_header($type, $length)   X-Ref
Genearte and send MIME header for the output image to client browser.

author: cjiang

xhprof_generate_image_by_dot($dot_script, $type)   X-Ref
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.

returns: , binary content of the generated image on success. empty string on
author: cjiang
param: dot_script, string, the script for DOT to generate the image.
param: type, one of the supported image types, see

xhprof_get_children_table($raw_data)   X-Ref
No description

xhprof_generate_dot_script($raw_data, $threshold, $source, $page,$func, $critical_path, $right=null,$left=null)   X-Ref
Generate DOT script from the given raw phprof data.

returns: , string, the DOT script to generate image.
author: cjiang
param: raw_data, phprof profile data.
param: threshold, float, the threshold value [0,1). The functions in the
param: page, string(optional), the root node name. This can be used to
param: func, string, the focus function.
param: critical_path, bool, whether or not to display critical path with

xhprof_render_diff_image($xhprof_runs_impl, $run1, $run2,$type, $threshold, $source)   X-Ref
No description

xhprof_get_content_by_run($xhprof_runs_impl, $run_id, $type,$threshold, $func, $source,$critical_path)   X-Ref
Generate image content from phprof run id.

returns: , string, the DOT script to generate image.
author: cjiang
param: object  $xhprof_runs_impl  An object that implements
param: run_id, integer, the unique id for the phprof run, this is the
param: type, string, one of the supported image types. See also
param: threshold, float, the threshold value [0,1). The functions in the
param: func, string, the focus function.

xhprof_render_image($xhprof_runs_impl, $run_id, $type, $threshold,$func, $source, $critical_path)   X-Ref
Generate image from phprof run id and send it to client.

author: cjiang
param: object  $xhprof_runs_impl  An object that implements
param: run_id, integer, the unique id for the phprof run, this is the
param: type, string, one of the supported image types. See also
param: threshold, float, the threshold value [0,1). The functions in the
param: func, string, the focus function.
param: bool, does this run correspond to a PHProfLive run or a dev run?