From 26f187f95112de5fc90848ead7c810156ee16393 Mon Sep 17 00:00:00 2001 From: Mohd Hafizuddin M Marzuki Date: Tue, 25 Jan 2022 21:55:13 +0800 Subject: [PATCH 1/2] Fix byte conversion --- src/Commands/Concerns/InteractsWithIO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/Concerns/InteractsWithIO.php b/src/Commands/Concerns/InteractsWithIO.php index b12b7eccb..5c93c8619 100644 --- a/src/Commands/Concerns/InteractsWithIO.php +++ b/src/Commands/Concerns/InteractsWithIO.php @@ -116,7 +116,7 @@ public function requestInfo($request, $verbosity = null) $duration = number_format(round($request['duration'], 2), 2, '.', ''); $memory = isset($request['memory']) - ? (number_format($request['memory'] / 1024 / 1204, 2, '.', '').' mb ') + ? (number_format($request['memory'] / 1024 / 1024, 2, '.', '').' mb ') : ''; ['method' => $method, 'statusCode' => $statusCode] = $request; From 33f8d46129ebfcee2eeb500d7e53ff5ea900a028 Mon Sep 17 00:00:00 2001 From: Mohd Hafizuddin M Marzuki Date: Tue, 25 Jan 2022 22:23:24 +0800 Subject: [PATCH 2/2] Fix test --- tests/CommandTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/CommandTest.php b/tests/CommandTest.php index 5ba951bf8..84a8d4914 100644 --- a/tests/CommandTest.php +++ b/tests/CommandTest.php @@ -75,9 +75,9 @@ public function test_request() ]); $this->assertEquals(<<<'EOF' - 200 GET /welcome ......... 14.11 mb 10.00 ms - 404 POST / ............. 16.54 mb 1234.00 ms - 500 POST /foofoofo... 24.65 mb 4567854.00 ms + 200 GET /welcome ......... 16.59 mb 10.00 ms + 404 POST / ............. 19.45 mb 1234.00 ms + 500 POST /foofoofo... 28.99 mb 4567854.00 ms EOF, $output->fetch()); }