27 use MediaWikiCoversValidator;
39 [
'main()', [
null,
'main()' ] ],
40 [
'foo==>bar', [
'foo',
'bar' ] ],
41 [
'bar@1==>bar@2', [
'bar@1',
'bar@2' ] ],
42 [
'foo==>bar==>baz', [
'foo',
'bar==>baz' ] ],
43 [
'==>bar', [
'',
'bar' ] ],
53 'include' => [
'main()' ],
55 $raw = $xhprofData->getRawData();
83 'variance' =>
'numeric',
84 'percent' =>
'numeric',
88 $metrics = $xhprofData->getInclusiveMetrics();
90 foreach ( $metrics as $name => $metric ) {
93 foreach ( $metricStruct as $key =>
$type ) {
94 if (
$type ===
'array' ) {
96 if ( $name ===
'main()' ) {
120 'subcalls' =>
'array',
122 $statsMetrics = [
'wt',
'cpu',
'mu',
'pmu' ];
124 'total' =>
'numeric',
128 'variance' =>
'numeric',
129 'percent' =>
'numeric',
130 'exclusive' =>
'numeric',
134 $metrics = $xhprofData->getCompleteMetrics();
136 foreach ( $metrics as $name => $metric ) {
139 foreach ( $metricStruct as $key =>
$type ) {
140 if (
in_array( $key, $statsMetrics ) ) {
142 $statStruct, $metric[$key], $key
145 $metric[$key][
'total'], $metric[$key][
'exclusive']
158 $this->
assertSame( [], $xhprofData->getCallers(
'main()' ) );
159 $this->
assertSame( [
'foo',
'xhprof_disable' ],
160 $xhprofData->getCallees(
'main()' )
163 $xhprofData->getCallers(
'foo' )
165 $this->
assertSame( [], $xhprofData->getCallees(
'strlen' ) );
173 $path = $xhprofData->getCriticalPath();
176 foreach ( $path as $key =>
$value ) {
242 'main()==>xhprof_disable' => [
268 $this->
assertCount( count( $struct ), $actual, $label );
269 foreach ( $struct as $key =>
$type ) {
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
testEdges()
XhprofData::getCallers XhprofData::getCallees.
getXhprofDataFixture(array $opts=[])
Get an Xhprof instance that has been primed with a set of known testing data.
testCriticalPath()
XhprofData::getCriticalPath.
testSplitKey( $key, $expect)
XhprofData::splitKey provideSplitKey.
testInclude()
XhprofData::pruneData.
assertArrayStructure( $struct, $actual, $label=null)
Assert that the given array has the described structure.
testInclusiveMetricsStructure()
Validate the structure of data returned by Xhprof::getInclusiveMetrics().
testCompleteMetricsStructure()
Validate the structure of data returned by Xhprof::getCompleteMetrics().
Convenience class for working with XHProf profiling data https://github.com/phacility/xhprof.
static splitKey( $key)
Convert an xhprof data key into an array of ['parent', 'child'] function names.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))