|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Functions | |
| xhprof_include_js_css ($ui_dir_url_path=null) | |
| xhprof_count_format ($num) | |
| xhprof_percent_format ($s, $precision=1) | |
| xhprof_render_actions ($actions) | |
| xhprof_render_link ($content, $href, $class='', $id='', $title='', $target='', $onclick='', $style='', $access='', $onmouseover='', $onmouseout='', $onmousedown='') | |
| sort_cbk ($a, $b) | |
| stat_description ($stat) | |
| profiler_report ($url_params, $rep_symbol, $sort, $run1, $run1_desc, $run1_data, $run2=0, $run2_desc="", $run2_data=array()) | |
| pct ($a, $b) | |
| get_print_class ($num, $bold) | |
| print_td_num ($num, $fmt_func, $bold=false, $attributes=null) | |
| print_td_pct ($numer, $denom, $bold=false, $attributes=null) | |
| print_function_info ($url_params, $info, $sort, $run1, $run2) | |
| print_flat_data ($url_params, $title, $flat_data, $sort, $run1, $run2, $limit) | |
| full_report ($url_params, $symbol_tab, $sort, $run1, $run2) | |
| get_tooltip_attributes ($type, $metric) | |
| pc_info ($info, $base_ct, $base_info, $parent) | |
| print_pc_array ($url_params, $results, $base_ct, $base_info, $parent, $run1, $run2) | |
| print_source_link ($info) | |
| print_symbol_summary ($symbol_info, $stat, $base) | |
| symbol_report ($url_params, $run_data, $symbol_info, $sort, $rep_symbol, $run1, $symbol_info1=null, $run2=0, $symbol_info2=null) | |
| profiler_single_run_report ($url_params, $xhprof_data, $run_desc, $rep_symbol, $sort, $run) | |
| profiler_diff_report ($url_params, $xhprof_data1, $run1_desc, $xhprof_data2, $run2_desc, $rep_symbol, $sort, $run1, $run2) | |
| displayXHProfReport ($xhprof_runs_impl, $url_params, $source, $run, $wts, $symbol, $sort, $run1, $run2) | |
Variables | |
| if (!isset($GLOBALS['XHPROF_LIB_ROOT'])) | |
| $base_path = rtrim(dirname($_SERVER['SCRIPT_NAME']), "/") | |
| $sort_col = "wt" | |
| $diff_mode = false | |
| $display_calls = true | |
| $sortable_columns | |
| $descriptions | |
| $format_cbk | |
| $diff_descriptions | |
| $stats = array() | |
| $pc_stats = array() | |
| $totals = 0 | |
| $totals_1 = 0 | |
| $totals_2 = 0 | |
| $metrics = null | |
| displayXHProfReport | ( | $ | xhprof_runs_impl, |
| $ | url_params, | ||
| $ | source, | ||
| $ | run, | ||
| $ | wts, | ||
| $ | symbol, | ||
| $ | sort, | ||
| $ | run1, | ||
| $ | run2 | ||
| ) |
Generate a XHProf Display View given the various URL parameters as arguments. The first argument is an object that implements the iXHProfRuns interface.
| object | $xhprof_runs_impl | An object that implements the iXHProfRuns interface |
| array | $url_params | Array of non-default URL params. |
| string | $source | Category/type of the run. The source in combination with the run id uniquely determines a profiler run. |
| string | $run | run id, or comma separated sequence of run ids. The latter is used if an aggregate report of the runs is desired. |
| string | $wts | Comma separate list of integers. Represents the weighted ratio in which which a set of runs will be aggregated. [Used only for aggregate reports.] |
| string | $symbol | Function symbol. If non-empty then the parent/child view of this function is displayed. If empty, a flat-profile view of the functions is displayed. |
| string | $run1 | Base run id (for diff reports) |
| string | $run2 | New run id (for diff reports) |
Definition at line 1382 of file xhprof.php.

| full_report | ( | $ | url_params, |
| $ | symbol_tab, | ||
| $ | sort, | ||
| $ | run1, | ||
| $ | run2 | ||
| ) |
Generates a tabular report for all functions. This is the top-level report.
Definition at line 781 of file xhprof.php.


| get_print_class | ( | $ | num, |
| $ | bold | ||
| ) |
Given a number, returns the td class to use for display.
For instance, negative numbers in diff reports comparing two runs (run1 & run2) represent improvement from run1 to run2. We use green to display those deltas, and red for regression deltas.
Definition at line 592 of file xhprof.php.

| get_tooltip_attributes | ( | $ | type, |
| $ | metric | ||
| ) |
Return attribute names and values to be used by javascript tooltip.
Definition at line 925 of file xhprof.php.

| pc_info | ( | $ | info, |
| $ | base_ct, | ||
| $ | base_info, | ||
| $ | parent | ||
| ) |
Print info for a parent or child function in the parent & children report.
Definition at line 935 of file xhprof.php.


| pct | ( | $ | a, |
| $ | b | ||
| ) |
Computes percentage for a pair of values, and returns it in string format.
Definition at line 576 of file xhprof.php.

| print_flat_data | ( | $ | url_params, |
| $ | title, | ||
| $ | flat_data, | ||
| $ | sort, | ||
| $ | run1, | ||
| $ | run2, | ||
| $ | limit | ||
| ) |
Print non-hierarchical (flat-view) of profiler data.
Definition at line 715 of file xhprof.php.


| print_function_info | ( | $ | url_params, |
| $ | info, | ||
| $ | sort, | ||
| $ | run1, | ||
| $ | run2 | ||
| ) |
Print "flat" data corresponding to one function.
Definition at line 655 of file xhprof.php.


| print_pc_array | ( | $ | url_params, |
| $ | results, | ||
| $ | base_ct, | ||
| $ | base_info, | ||
| $ | parent, | ||
| $ | run1, | ||
| $ | run2 | ||
| ) |
Definition at line 962 of file xhprof.php.


| print_source_link | ( | $ | info | ) |
Definition at line 1004 of file xhprof.php.


| print_symbol_summary | ( | $ | symbol_info, |
| $ | stat, | ||
| $ | base | ||
| ) |
| print_td_num | ( | $ | num, |
| $ | fmt_func, | ||
| $ | bold = false, |
||
| $ | attributes = null |
||
| ) |
Prints a
element with a numeric value.
Definition at line 620 of file xhprof.php.


| print_td_pct | ( | $ | numer, |
| $ | denom, | ||
| $ | bold = false, |
||
| $ | attributes = null |
||
| ) |
Prints a
element with a pecentage.
Definition at line 634 of file xhprof.php.


| profiler_diff_report | ( | $ | url_params, |
| $ | xhprof_data1, | ||
| $ | run1_desc, | ||
| $ | xhprof_data2, | ||
| $ | run2_desc, | ||
| $ | rep_symbol, | ||
| $ | sort, | ||
| $ | run1, | ||
| $ | run2 | ||
| ) |
Generate the profiler report for diff mode (delta between two runs).
Definition at line 1322 of file xhprof.php.


| profiler_report | ( | $ | url_params, |
| $ | rep_symbol, | ||
| $ | sort, | ||
| $ | run1, | ||
| $ | run1_desc, | ||
| $ | run1_data, | ||
| $ | run2 = 0, |
||
| $ | run2_desc = "", |
||
| $ | run2_data = array() |
||
| ) |
Analyze raw data & generate the profiler report (common for both single run mode and diff mode).
Definition at line 441 of file xhprof.php.


| profiler_single_run_report | ( | $ | url_params, |
| $ | xhprof_data, | ||
| $ | run_desc, | ||
| $ | rep_symbol, | ||
| $ | sort, | ||
| $ | run | ||
| ) |
Generate the profiler report for a single run.
Definition at line 1302 of file xhprof.php.


| sort_cbk | ( | $ | a, |
| $ | b | ||
| ) |
Callback comparison operator (passed to usort() for sorting array of tuples) that compares array elements based on the sort column specified in $sort_col (global parameter).
Definition at line 383 of file xhprof.php.
| stat_description | ( | $ | stat | ) |
Get the appropriate description for a statistic (depending upon whether we are in diff report mode or single run report mode).
Definition at line 422 of file xhprof.php.

| symbol_report | ( | $ | url_params, |
| $ | run_data, | ||
| $ | symbol_info, | ||
| $ | sort, | ||
| $ | rep_symbol, | ||
| $ | run1, | ||
| $ | symbol_info1 = null, |
||
| $ | run2 = 0, |
||
| $ | symbol_info2 = null |
||
| ) |
Generates a report for a single function/symbol.
Definition at line 1036 of file xhprof.php.


| xhprof_count_format | ( | $ | num | ) |
Definition at line 99 of file xhprof.php.
| xhprof_include_js_css | ( | $ | ui_dir_url_path = null | ) |
Generate references to required stylesheets & javascript.
If the calling script (such as index.php) resides in a different location that than 'xhprof_html' directory the caller must provide the URL path to 'xhprof_html' directory so that the correct location of the style sheets/javascript can be specified in the generated HTML.
Definition at line 58 of file xhprof.php.
| xhprof_percent_format | ( | $ | s, |
| $ | precision = 1 |
||
| ) |
| xhprof_render_actions | ( | $ | actions | ) |
Implodes the text for a bunch of actions (such as links, forms, into a HTML list and returns the text.
Definition at line 116 of file xhprof.php.

| xhprof_render_link | ( | $ | content, |
| $ | href, | ||
| $ | class = '', |
||
| $ | id = '', |
||
| $ | title = '', |
||
| $ | target = '', |
||
| $ | onclick = '', |
||
| $ | style = '', |
||
| $ | access = '', |
||
| $ | onmouseover = '', |
||
| $ | onmouseout = '', |
||
| $ | onmousedown = '' |
||
| ) |
| html-str | $content | the text/image/innerhtml/whatever for the link |
| raw-str | $href | |
| raw-str | $class | |
| raw-str | $id | |
| raw-str | $title | |
| raw-str | $target | |
| raw-str | $onclick | |
| raw-str | $style | |
| raw-str | $access | |
| raw-str | $onmouseover | |
| raw-str | $onmouseout | |
| raw-str | $onmousedown | |
| raw-str | $dir | |
| raw-str | $rel |
Definition at line 147 of file xhprof.php.

| $base_path = rtrim(dirname($_SERVER['SCRIPT_NAME']), "/") |
Our coding convention disallows relative paths in hrefs. Get the base URL path from the SCRIPT_NAME.
Definition at line 45 of file xhprof.php.
| $descriptions |
Definition at line 234 of file xhprof.php.
| $diff_descriptions |
Definition at line 319 of file xhprof.php.
| $diff_mode = false |
Definition at line 209 of file xhprof.php.
| $display_calls = true |
Definition at line 212 of file xhprof.php.
| $format_cbk |
Definition at line 276 of file xhprof.php.
| $metrics = null |
Definition at line 374 of file xhprof.php.
| $pc_stats = array() |
Definition at line 364 of file xhprof.php.
| $sort_col = "wt" |
Definition at line 206 of file xhprof.php.
| $sortable_columns |
array("fn" => 1, "ct" => 1, "wt" => 1, "excl_wt" => 1, "ut" => 1, "excl_ut" => 1, "st" => 1, "excl_st" => 1, "mu" => 1, "excl_mu" => 1, "pmu" => 1, "excl_pmu" => 1, "cpu" => 1, "excl_cpu" => 1, "samples" => 1, "excl_samples" => 1 )
Definition at line 215 of file xhprof.php.
| $stats = array() |
Definition at line 361 of file xhprof.php.
| $totals = 0 |
Definition at line 367 of file xhprof.php.
| $totals_1 = 0 |
Definition at line 368 of file xhprof.php.
| $totals_2 = 0 |
Definition at line 369 of file xhprof.php.
| if(!isset($GLOBALS['XHPROF_LIB_ROOT'])) |
Definition at line 31 of file xhprof.php.