Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402]

(no description)

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

Defines 2 classes

iXHProfRuns:: (2 methods):
  get_run()
  save_run()

XHProfRuns_Default:: (6 methods):
  gen_run_id()
  file_name()
  __construct()
  get_run()
  save_run()
  list_runs()


Interface: iXHProfRuns  - X-Ref

iXHProfRuns interface for getting/saving a XHProf run.

Clients can either use the default implementation,
namely XHProfRuns_Default, of this interface or define
their own implementation.

get_run($run_id, $type, &$run_desc)   X-Ref
Returns XHProf data given a run id ($run) of a given
type ($type).

Also, a brief description of the run is returned via the
$run_desc out parameter.

save_run($xhprof_data, $type, $run_id = null)   X-Ref
Save XHProf data for a profiler run of specified type
($type).

The caller may optionally pass in run_id (which they
promise to be unique). If a run_id is not passed in,
the implementation of this method must generated a
unique run id for this saved XHProf run.

Returns the run id for the saved XHProf run.


Class: XHProfRuns_Default  - X-Ref

XHProfRuns_Default is the default implementation of the
iXHProfRuns interface for saving/fetching XHProf runs.

It stores/retrieves runs to/from a filesystem directory
specified by the "xhprof.output_dir" ini parameter.

gen_run_id($type)   X-Ref
No description

file_name($run_id, $type)   X-Ref
No description

__construct($dir = null)   X-Ref
No description

get_run($run_id, $type, &$run_desc)   X-Ref
No description

save_run($xhprof_data, $type, $run_id = null)   X-Ref
No description

list_runs()   X-Ref
No description