MediaWiki
1.27.2
|
Public Member Functions | |
provideRawData () | |
provideSplitKey () | |
setUp () | |
testCompleteMetricsStructure () | |
Validate the structure of data returned by Xhprof::getCompleteMetrics(). More... | |
testCriticalPath () | |
Xhprof::getCriticalPath Xhprof. More... | |
testEdges () | |
Xhprof::getCallers Xhprof::getCallees Xhprof. More... | |
testInclude () | |
Xhprof::pruneData. More... | |
testInclusiveMetricsStructure () | |
Validate the structure of data returned by Xhprof::getInclusiveMetrics(). More... | |
testRawData ($flags, $keys) | |
Xhprof::__construct Xhprof::stop Xhprof::getRawData provideRawData. More... | |
testSplitKey ($key, $expect) | |
Xhprof::splitKey provideSplitKey. More... | |
Protected Member Functions | |
assertArrayStructure ($struct, $actual, $label=null) | |
Assert that the given array has the described structure. More... | |
getXhprofFixture (array $opts=[]) | |
Get an Xhprof instance that has been primed with a set of known testing data. More... | |
Definition at line 28 of file XhprofTest.php.
|
protected |
Assert that the given array has the described structure.
array | $struct | Array of key => type mappings |
array | $actual | Array to check |
string | $label |
Definition at line 312 of file XhprofTest.php.
References $key, $type, and as.
Referenced by testCompleteMetricsStructure(), and testInclusiveMetricsStructure().
|
protected |
Get an Xhprof instance that has been primed with a set of known testing data.
Tests for the Xhprof class should laregly be concerned with evaluating the manipulations of the data collected by xhprof rather than the data collection process itself.
The returned Xhprof instance primed will be with a data set created by running this trivial program using the PECL xhprof implementation:
Definition at line 256 of file XhprofTest.php.
Referenced by testCompleteMetricsStructure(), testCriticalPath(), testEdges(), testInclude(), and testInclusiveMetricsStructure().
XhprofTest::provideRawData | ( | ) |
Definition at line 70 of file XhprofTest.php.
XhprofTest::provideSplitKey | ( | ) |
Definition at line 44 of file XhprofTest.php.
XhprofTest::setUp | ( | ) |
Definition at line 30 of file XhprofTest.php.
XhprofTest::testCompleteMetricsStructure | ( | ) |
Validate the structure of data returned by Xhprof::getCompleteMetrics().
This acts as a guard against unexpected structural changes to the returned data in lieu of using a more heavy weight typed response object.
Definition at line 154 of file XhprofTest.php.
References $key, $name, $type, as, assertArrayStructure(), and getXhprofFixture().
XhprofTest::testCriticalPath | ( | ) |
Xhprof::getCriticalPath Xhprof.
Definition at line 215 of file XhprofTest.php.
References $key, $last, $path, $value, as, getXhprofFixture(), list, and Xhprof\splitKey().
XhprofTest::testEdges | ( | ) |
Xhprof::getCallers Xhprof::getCallees Xhprof.
Definition at line 199 of file XhprofTest.php.
References getXhprofFixture().
XhprofTest::testInclude | ( | ) |
XhprofTest::testInclusiveMetricsStructure | ( | ) |
Validate the structure of data returned by Xhprof::getInclusiveMetrics().
This acts as a guard against unexpected structural changes to the returned data in lieu of using a more heavy weight typed response object.
Definition at line 112 of file XhprofTest.php.
References $key, $name, $type, as, assertArrayStructure(), and getXhprofFixture().
XhprofTest::testRawData | ( | $flags, | |
$keys | |||
) |
Xhprof::__construct Xhprof::stop Xhprof::getRawData provideRawData.
Definition at line 61 of file XhprofTest.php.
XhprofTest::testSplitKey | ( | $key, | |
$expect | |||
) |
Xhprof::splitKey provideSplitKey.
Definition at line 40 of file XhprofTest.php.
References $key, and Xhprof\splitKey().