Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.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.

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

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.

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
author: cjiang
returns: , string, the DOT script to generate image.

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.

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.
author: cjiang
returns: , string, the DOT script to generate image.

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.

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?
author: cjiang