Closure
createPackager
displayXHProfReport
full_report
get_print_class
get_tooltip_attributes
init_metrics
pc_info
pct
print_flat_data
print_function_info
print_pc_array
print_symbol_summary
print_td_num
print_td_pct
profiler_diff_report
profiler_report
profiler_single_run_report
sort_cbk
stat_description
symbol_report
xhprof_aggregate_runs
xhprof_array_set
xhprof_array_unset
xhprof_build_parent_child_key
xhprof_compute_diff
xhprof_compute_flat_info
xhprof_compute_inclusive_times
xhprof_count_format
xhprof_error
xhprof_generate_dot_script
xhprof_generate_image_by_dot
xhprof_generate_mime_header
xhprof_get_bool_param
xhprof_get_children_table
xhprof_get_content_by_run
xhprof_get_float_param
xhprof_get_matching_functions
xhprof_get_metrics
xhprof_get_param_helper
xhprof_get_possible_metrics
xhprof_get_string_param
xhprof_get_uint_param
xhprof_http_header
xhprof_include_js_css
xhprof_normalize_metrics
xhprof_param_init
xhprof_parse_parent_child
xhprof_percent_format
xhprof_prune_run
xhprof_render_actions
xhprof_render_diff_image
xhprof_render_image
xhprof_render_link
xhprof_trim_run
xhprof_valid_run
XHPROF_BOOL_PARAM
XHPROF_FLOAT_PARAM
XHPROF_STRING_PARAM
XHPROF_UINT_PARAM
Closure()
createPackager($original_file, $options)
displayXHProfReport(object $xhprof_runs_impl, array $url_params, string $source, string $run, string $wts, string $symbol, $sort, string $run1, string $run2)
objectAn object that implements the iXHProfRuns interface .
arrayArray of non-default URL params.
stringCategory/type of the run. The source in combination with the run id uniquely determines a profiler run.
stringrun id, or comma separated sequence of run ids. The latter is used if an aggregate report of the runs is desired.
stringComma separate list of integers. Represents the weighted ratio in which which a set of runs will be aggregated. [Used only for aggregate reports.]
stringFunction 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.
stringBase run id (for diff reports)
stringNew run id (for diff reports)
full_report($url_params, $symbol_tab, $sort, $run1, $run2)
get_print_class($num, $bold)
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.
get_tooltip_attributes($type, $metric)
init_metrics($xhprof_data, $rep_symbol, $sort, $diff_report)
pc_info($info, $base_ct, $base_info, $parent)
pct($a, $b)
print_flat_data($url_params, $title, $flat_data, $sort, $run1, $run2, $limit)
print_function_info($url_params, $info, $sort, $run1, $run2)
print_pc_array($url_params, $results, $base_ct, $base_info, $parent, $run1, $run2)
print_symbol_summary($symbol_info, $stat, $base)
print_td_num($num, $fmt_func, $bold, $attributes)
print_td_pct($numer, $denom, $bold, $attributes)
profiler_diff_report($url_params, $xhprof_data1, $run1_desc, $xhprof_data2, $run2_desc, $rep_symbol, $sort, $run1, $run2)
| author | Kannan |
|---|
profiler_report($url_params, $rep_symbol, $sort, $run1, $run1_desc, $run1_data, $run2, $run2_desc, $run2_data)
| author | : Kannan |
|---|
profiler_single_run_report($url_params, $xhprof_data, $run_desc, $rep_symbol, $sort, $run)
sort_cbk($a, $b)
stat_description($stat)
symbol_report($url_params, $run_data, $symbol_info, $sort, $rep_symbol, $run1, $symbol_info1, $run2, $symbol_info2)
| author | Kannan |
|---|
xhprof_aggregate_runs(object $xhprof_runs_impl, array $runs, array $wts, string $source, bool $use_script_name) : array
Suppose you have run:5 corresponding to page1.php, run:6 corresponding to page2.php, and run:7 corresponding to page3.php and you want to accumulate these runs in a 2:4:1 ratio. You can do so by calling: xhprof_aggregate_runs(array(5, 6, 7), array(2, 4, 1)); The above will return raw data for the runs aggregated in 2:4:1 ratio.
| author | Kannan |
|---|
objectAn object that implements the iXHProfRuns interface
arrayrun ids of the XHProf runs..
arrayintegral (ideally) weights for $runs
stringsource to fetch raw data for run from
boolIf true, a fake edge from main() to to __script::
arrayReturn aggregated raw dataxhprof_array_set($arr, $k, $v)
xhprof_array_unset($arr, $k)
xhprof_build_parent_child_key($parent, $child)
xhprof_compute_diff($xhprof_data1, $xhprof_data2)
xhprof_compute_flat_info(array $raw_data, array $overall_totals) : array
Also, store overall totals in the 2nd argument.
| author | Kannan Muthukkaruppan |
|---|
arrayXHProf format raw profiler data.
array&$overall_totals OUT argument for returning overall totals for various metrics.
arrayReturns a map from function name to its call count and inclusive & exclusive metrics (such as wall time, etc.).xhprof_compute_inclusive_times($raw_data) : array
The raw data contains inclusive metrics of a function for each unique parent function it is called from. The total inclusive metrics for a function is therefore the sum of inclusive metrics for the function across all parents.
| author | Kannan |
|---|
arrayReturns a map of function name to total (across all parents) inclusive metrics for the function.xhprof_count_format($num)
xhprof_error($message)
xhprof_generate_dot_script(\raw_data, $raw_data, \threshold, $threshold, \page, $source, \func, $page, \critical_path, $func, $critical_path, $right, $left)
| returns | , string, the DOT script to generate image. |
|---|---|
| author | cjiang |
\raw_data,phprof profile data.
\threshold,float, the threshold 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), the root node name. This can be used to replace the 'main()' as the root node.
\func,string, the focus function.
\critical_path,bool, whether or not to display critical path with bold lines.
xhprof_generate_image_by_dot(\dot_script, $dot_script, \type, $type)
| returns | , binary content of the generated image on success. empty string on failure. |
|---|---|
| author | cjiang |
\dot_script,string, the script for DOT to generate the image.
\type,one of the supported image types, see $xhprof_legal_image_types.
xhprof_generate_mime_header($type, $length)
xhprof_get_bool_param($param, $default)
If value is not a valid unsigned integer, logs error and returns null.
| author | Kannan |
|---|
xhprof_get_children_table($raw_data)
xhprof_get_content_by_run(object $xhprof_runs_impl, \run_id, $run_id, \type, $type, \threshold, $threshold, \func, $func, $source, $critical_path)
| returns | , string, the DOT script to generate image. |
|---|---|
| author | cjiang |
objectAn object that implements the iXHProfRuns interface
\run_id,integer, the unique id for the phprof run, this is the primary key for phprof database table.
\type,string, one of the supported image types. See also $xhprof_legal_image_types.
\threshold,float, the threshold 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, the focus function.
xhprof_get_float_param($param, $default)
If value is not a valid unsigned integer, logs error and returns null.
| author | Kannan |
|---|
xhprof_get_matching_functions($q, $xhprof_data)
xhprof_get_metrics($xhprof_data)
xhprof_get_param_helper(string $param)
xhprof_get_possible_metrics()
xhprof_get_string_param($param, $default)
xhprof_get_uint_param($param, $default)
If value is not a valid unsigned integer, logs error and returns null.
| author | Kannan |
|---|
xhprof_http_header(string $name, string $value)
stringHTTP header name, like 'Location'
stringHTTP header value, like 'http://www.example.com/'
xhprof_include_js_css($ui_dir_url_path)
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.
xhprof_normalize_metrics($raw_data, $num_runs)
xhprof_param_init($params)
| params | array $params An array whose keys are the names of URL params who value needs to be retrieved from the URL query string. PHP globals are created with these names. The value is itself an array with 2-elems (the param type, and its default value). If a param is not specified in the query string the default value is used. |
|---|---|
| author | Kannan |
xhprof_parse_parent_child($parent_child)
xhprof_percent_format($s, $precision)
xhprof_prune_run($raw_data, $prune_percent)
xhprof_render_actions($actions)
xhprof_render_diff_image($xhprof_runs_impl, $run1, $run2, $type, $threshold, $source)
xhprof_render_image(object $xhprof_runs_impl, \run_id, $run_id, \type, $type, \threshold, $threshold, \func, $func, \bool, $source, $critical_path)
| author | cjiang |
|---|
objectAn object that implements the iXHProfRuns interface
\run_id,integer, the unique id for the phprof run, this is the primary key for phprof database table.
\type,string, one of the supported image types. See also $xhprof_legal_image_types.
\threshold,float, the threshold 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, the focus function.
\bool,does this run correspond to a PHProfLive run or a dev run?
xhprof_render_link(\html-str $content, \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)
\html-strthe text/image/innerhtml/whatever for the link
\raw-str
\raw-str
\raw-str
\raw-str
\raw-str
\raw-str
\raw-str
\raw-str
\raw-str
\raw-str
\raw-str
xhprof_trim_run(array $raw_data, array $functions_to_keep) : array
Note: Function main() is also always kept so that overall totals can still be obtained from the trimmed version.
| author | Kannan |
|---|
arrayXHProf raw data
arrayarray of function names
arrayTrimmed XHProf Reportxhprof_valid_run($run_id, array $raw_data) : bool
@param int $run_id Run id of run to be pruned. [Used only for reporting errors.]
| author | Kannan |
|---|
arrayXHProf raw data to be pruned /p>
booltrue on success, false on failureXHProfRuns_Default is the default implementation of the iXHProfRuns interface for saving/fetching XHProf runs.
« More »XHPROF_BOOL_PARAM
XHPROF_FLOAT_PARAM
XHPROF_STRING_PARAM
XHPROF_UINT_PARAM