## Closure()

Closure()

## createPackager()

createPackager($original_file,$options)

## Generate a XHProf Display View given the various URL parameters as arguments. The first argument is an object that implements the iXHProfRuns interface.

displayXHProfReport(object $xhprof_runs_impl, array$url_params, string $source, string$run, string $wts, string$symbol, $sort, string$run1, string $run2)  ### Parameters ####$xhprof_runs_impl

object

An object that implements the iXHProfRuns interface .

#### $url_params array Array of non-default URL params. ####$source

string

Category/type of the run. The source in combination with the run id uniquely determines a profiler run.

#### $run string run id, or comma separated sequence of run ids. The latter is used if an aggregate report of the runs is desired. ####$wts

string

Comma separate list of integers. Represents the weighted ratio in which which a set of runs will be aggregated. [Used only for aggregate reports.]

#### $run1 string Base run id (for diff reports) ####$run2

string

New run id (for diff reports)

## Given a number, returns the td class to use for display.

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.

## Return attribute names and values to be used by javascript tooltip.

get_tooltip_attributes($type,$metric)

## Initialize the metrics we'll display based on the information in the raw data.

init_metrics($xhprof_data,$rep_symbol, $sort,$diff_report)

author Kannan

## Print info for a parent or child function in the parent & children report.

pc_info($info,$base_ct, $base_info,$parent)

author Kannan

## Computes percentage for a pair of values, and returns it in string format.

pct($a,$b)

## Generate the profiler report for a single run.

profiler_single_run_report($url_params,$xhprof_data, $run_desc,$rep_symbol, $sort,$run)

author Kannan

### Parameters

#### $b ## Get the appropriate description for a statistic (depending upon whether we are in diff report mode or single run report mode). stat_description($stat)

author Kannan

### Parameters

#### $stat ## Generates a report for a single function/symbol. symbol_report($url_params, $run_data,$symbol_info, $sort,$rep_symbol, $run1,$symbol_info1, $run2,$symbol_info2)

author Kannan

### Parameters

#### $symbol_info2 ## Get raw data corresponding to specified array of runs aggregated by certain weightage. 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

### Parameters

#### $xhprof_runs_impl object An object that implements the iXHProfRuns interface ####$runs

array

run ids of the XHProf runs..

#### $source string source to fetch raw data for run from ####$use_script_name

bool

If true, a fake edge from main() to to __script:: is introduced in the raw data so that after aggregations the script name is still preserved.

### Returns

arrayReturn aggregated raw data

## Removes/unsets one key in an array and return the array

xhprof_array_unset($arr,$k)

author Kannan

## Given parent & child function name, composes the key in the format present in the raw data.

xhprof_build_parent_child_key($parent,$child)

author Kannan

## Hierarchical diff: Compute and return difference of two call graphs: Run2 - Run1.

xhprof_compute_diff($xhprof_data1,$xhprof_data2)

author Kannan

## Analyze hierarchical raw data, and compute per-function (flat) inclusive and exclusive metrics.

xhprof_compute_flat_info(array $raw_data, array$overall_totals) : array

Also, store overall totals in the 2nd argument.

author Kannan Muthukkaruppan

### Parameters

#### $raw_data array XHProf format raw profiler data. ####$overall_totals

array

&$overall_totals OUT argument for returning overall totals for various metrics. ### Returns arrayReturns a map from function name to its call count and inclusive & exclusive metrics (such as wall time, etc.). ## Compute inclusive metrics for function. This code was factored out of xhprof_compute_flat_info(). 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

### Parameters

#### $message ## Generate DOT script from the given raw phprof data. 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. cjiang ### Parameters ####$raw_data

\raw_data,

phprof profile data.

#### $threshold \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. ####$source

\page,

string(optional), the root node name. This can be used to replace the 'main()' as the root node.

#### $page \func, string, the focus function. ####$func

\critical_path,

bool, whether or not to display critical path with bold lines.

#### $left ## 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. xhprof_generate_image_by_dot(\dot_script,$dot_script, \type, $type)  returns , binary content of the generated image on success. empty string on failure. cjiang ### Parameters ####$dot_script

\dot_script,

string, the script for DOT to generate the image.

## Genearte and send MIME header for the output image to client browser.

xhprof_generate_mime_header($type,$length)

author cjiang

## Extracts value for a boolean param $param from query string. If param is not specified, return the$default value.

xhprof_get_bool_param($param,$default)

If value is not a valid unsigned integer, logs error and returns null.

author Kannan

## Generate image content from phprof run id.

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. cjiang ### Parameters ####$xhprof_runs_impl

object

An object that implements the iXHProfRuns interface

#### $run_id \run_id, integer, the unique id for the phprof run, this is the primary key for phprof database table. ####$type

\type,

string, one of the supported image types. See also $xhprof_legal_image_types. ####$threshold

\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.

#### $default ## Given a partial query string$q return matching function names in specified XHProf run. This is used for the type ahead function selector.

xhprof_get_matching_functions($q,$xhprof_data)

author Kannan

## Internal helper function used by various xhprof_get_param* flavors for various types of parameters.

xhprof_get_param_helper(string $param)  author Kannan ### Parameters ####$param

string

name of the URL query string param

## xhprof_get_possible_metrics()

xhprof_get_possible_metrics()

## Extracts value for string param $param from query string. If param is not specified, return the$default value.

xhprof_get_string_param($param,$default)

author Kannan

## Extracts value for unsigned integer param $param from query string. If param is not specified, return the$default value.

xhprof_get_uint_param($param,$default)

If value is not a valid unsigned integer, logs error and returns null.

author Kannan

## 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.

xhprof_http_header(string $name, string$value)

### Parameters

#### $name string HTTP header name, like 'Location' ####$value

string

## Takes raw XHProf data that was aggregated over "$num_runs" number of runs averages/nomalizes the data. Essentially the various metrics collected are divided by$num_runs.

xhprof_normalize_metrics($raw_data,$num_runs)

author Kannan

## Initialize params from URL query string. The function creates globals variables for each of the params and if the URL query string doesn't specify a particular param initializes them with the corresponding default value specified in the input.

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. Kannan

### Parameters

#### $params ## Takes a parent/child function name encoded as "a==>b" and returns array("a", "b"). xhprof_parse_parent_child($parent_child)

author Kannan

### Parameters

#### $source ## Generate image from phprof run id and send it to client. xhprof_render_image(object$xhprof_runs_impl, \run_id, $run_id, \type,$type, \threshold, $threshold, \func,$func, \bool, $source,$critical_path)

author cjiang

### Parameters

#### $xhprof_runs_impl object An object that implements the iXHProfRuns interface ####$run_id

\run_id,

integer, the unique id for the phprof run, this is the primary key for phprof database table.

#### $threshold \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

\func,

string, the focus function.

## Return a trimmed version of the XHProf raw data. Note that the raw data contains one entry for each unique parent/child function combination.The trimmed version of raw data will only contain entries where either the parent or child function is in the list of $functions_to_keep. 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 ### Parameters ####$raw_data

array

XHProf raw data

#### $functions_to_keep array array of function names ### Returns arrayTrimmed XHProf Report ## Checks if XHProf raw data appears to be valid and not corrupted. xhprof_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

### Parameters

#### $run_id ####$raw_data

array

XHProf raw data to be pruned /p>

### Returns

booltrue on success, false on failure

« More »

# iXHProfRuns¶

iXHProfRuns interface for getting/saving a XHProf run.

« More »

« More »

# XHProfRuns_Default¶

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

« More »

« More »

« More »

« More »

« More »

« More »

# Attribute¶

Class representing a single GraphViz attribute.

« More »

# AttributeTest¶

Test for the the class representing a GraphViz attribute.

« More »

# Edge¶

Class representing an edge (arrow, line).

« More »

# Exception¶

Class representing an exception in this GraphViz component.

« More »

# Graph¶

Class representing a graph; this may be a main graph but also a subgraph.

« More »

# Node¶

Class representing a node / element in a graph.

« More »

# DocBlock¶

Parses the DocBlock for any structure.

« More »

# DocBlockTest¶

Test class for phpDocumentor_Reflection_DocBlock

« More »

# LongDescription¶

Parses a Long Description of a DocBlock.

« More »

# Tag¶

Parses a tag definition for a DocBlock.

« More »

# CoversTag¶

Reflection class for a @covers tag in a Docblock.

« More »

# CoversTagTest¶

Test class for phpDocumentor_Reflection_DocBlock_Tag_Covers

« More »

Reflection class for a @link tag in a Docblock.

« More »

« More »

# MethodTag¶

Reflection class for a {@method} in a Docblock.

« More »

# MethodTagTest¶

Test class for \phpDocumentor\Reflection\DocBlock\Tag\MethodTag

« More »

# ParamTag¶

Reflection class for a {@param} tag in a Docblock.

« More »

Reflection class for a {@property} tag in a Docblock.

« More »

# PropertyTag¶

Reflection class for a {@property} tag in a Docblock.

« More »

# PropertyWriteTag¶

Reflection class for a {@property} tag in a Docblock.

« More »

# ReturnTag¶

Reflection class for a {@return} tag in a Docblock.

« More »

# SeeTag¶

Reflection class for a {@see} tag in a Docblock.

« More »

# SeeTagTest¶

Test class for phpDocumentor_Reflection_DocBlock_Tag_See

« More »

# ThrowTag¶

Reflection class for a mistyped @throws tag called @throw in a Docblock.

« More »

# ThrowsTag¶

Reflection class for a {@throws} tag in a Docblock.

« More »

# UsesTag¶

Reflection class for a {@uses} tag in a Docblock.

« More »

# UsesTagTest¶

Test class for phpDocumentor_Reflection_DocBlock_Tag_Uses

« More »

# VarTag¶

Reflection class for a {@var} tag in a Docblock.

« More »

# VarTagTest¶

« More »

## XHPROF_BOOL_PARAM

XHPROF_BOOL_PARAM

## XHPROF_FLOAT_PARAM

XHPROF_FLOAT_PARAM

## Type definitions for URL params

XHPROF_STRING_PARAM

## XHPROF_UINT_PARAM

XHPROF_UINT_PARAM

# phpDocumentor_GraphViz_NodeTest¶

Test for the the class representing a GraphViz node.

« More »