diff --git a/Classes/Service/ConfigService.php b/Classes/Service/ConfigService.php index 0c18c39..b1e8f9f 100644 --- a/Classes/Service/ConfigService.php +++ b/Classes/Service/ConfigService.php @@ -10,7 +10,15 @@ final class ConfigService { /** @var int */ private const DEFAULT_STOP_WATCH_LIMIT = 100_000; + + /** + * @var int + */ private const DEFAULT_DESCRIPTION_LENGTH = 100; + + /** + * @var int + */ private const DEFAULT_NUMBER_TIMINGS = 70; public function stopWatchLimit(): int diff --git a/Classes/Utility/TimingUtility.php b/Classes/Utility/TimingUtility.php index 3e0ebd2..a78dc79 100644 --- a/Classes/Utility/TimingUtility.php +++ b/Classes/Utility/TimingUtility.php @@ -142,6 +142,7 @@ public function shutdown(ScriptResult $result): ?ResponseInterface $duration = $time->getDuration(); $timings[$duration . $index] = $this->timingString($index, trim($time->key . ' ' . $time->info . ' ' . $duration), $duration); } + krsort($timings); $timings = array_slice($timings, 0, $this->configService->getMaxNumberOfTimings());