Skip to content

Commit

Permalink
Merge pull request #16 from magento-amigos/2.4-develop-prs-patch-5
Browse files Browse the repository at this point in the history
[Amigos] Community Contributions 2.4-develop - Patch 5
  • Loading branch information
ishakhsuvarov committed Aug 17, 2022
2 parents e212168 + b9bdcbd commit 5622a66
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ protected function _getOrderedTimerIds()
while (strpos($timerId, $prevTimerId . Profiler::NESTING_SEPARATOR) !== 0) {
/* Add to result all timers nested in the previous timer */
for ($j = $i + 1; $j < $numberTimerIds; $j++) {
if (isset($timerIds[$j]) &&
strpos($timerIds[$j], $prevTimerId . Profiler::NESTING_SEPARATOR) === 0) {
if (!$timerIds[$j]) {
continue;
}
if (strpos($timerIds[$j], $prevTimerId . Profiler::NESTING_SEPARATOR) === 0) {
$result[] = $timerIds[$j];
/* Mark timer as already added */
$timerIds[$j] = null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php declare(strict_types=1);
/**
* Test class for \Magento\Framework\Profiler\Driver\Standard\Stat
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand Down Expand Up @@ -238,13 +236,24 @@ public function timersSortingDataProvider()
['start', 'root'],
['start', 'root->init'],
['start', 'root->system'],
['start', 'root->system->init_config'],
['stop', 'root->system->init_config'],
['start', 'root->system->init_store'],
['stop', 'root->system->init_store'],
['stop', 'root->system'],
['start', 'root->init->init_config'],
['stop', 'root->init->init_config'],
['stop', 'root->init'],
['stop', 'root'],
],
'expected' => ['root', 'root->init', 'root->init->init_config', 'root->system'],
'expected' => [
'root',
'root->init',
'root->init->init_config',
'root->system',
'root->system->init_config',
'root->system->init_store',
],
]
];
}
Expand Down

0 comments on commit 5622a66

Please sign in to comment.