PHP Class lithium\test\filter\Profiler

Inheritance: extends lithium\test\Filter
Show file Open project: unionofrad/lithium

Protected Properties

Property Type Description
$_formatters
$_metrics array Contains the list of profiler checks to run against each test. Values can be string function names, arrays containing function names as the first key and function parameters as subsequent keys, or closures.

Public Methods

Method Description
analyze ( object $report, array $options = [] ) : array Analyzes the results of a test run and returns the result of the analysis.
apply ( object $report, array $tests, array $options = [] ) : object Takes an instance of an object (usually a Collection object) containing test instances. Allows for preparing tests before they are run.
check ( mixed $name, string $value = null ) : mixed Add, remove, or modify a profiler check.
collect ( array $filterResults ) : array Collects the raw filter results and packages them for analysis.
reset ( ) Verifies that the corresponding function exists for each built-in profiler check.

Method Details

analyze() public static method

Analyzes the results of a test run and returns the result of the analysis.
public static analyze ( object $report, array $options = [] ) : array
$report object The report instance running this filter and aggregating results
$options array Not used.
return array The results of the analysis.

apply() public static method

Takes an instance of an object (usually a Collection object) containing test instances. Allows for preparing tests before they are run.
public static apply ( object $report, array $tests, array $options = [] ) : object
$report object Instance of Report which is calling apply.
$tests array The test to apply this filter on
$options array Options for how this filter should be applied. Available options are: - `'method'` - `'run'` - `'checks'`
return object Returns the instance of `$tests`.

check() public method

Add, remove, or modify a profiler check.
See also: lithium\test\Profiler::$_metrics
public check ( mixed $name, string $value = null ) : mixed
$name mixed
$value string
return mixed

collect() public static method

Collects the raw filter results and packages them for analysis.
public static collect ( array $filterResults ) : array
$filterResults array The results of the filter on the test run.
return array The packaged filter results prepared for analysis.

reset() public static method

Initializes display formatters.
public static reset ( )

Property Details

$_formatters protected static property

protected static $_formatters

$_metrics protected static property

Contains the list of profiler checks to run against each test. Values can be string function names, arrays containing function names as the first key and function parameters as subsequent keys, or closures.
See also: lithium\test\Profiler::check()
protected static array $_metrics
return array