Skip to content

Commit 1e06328

Browse files
authored
[1.x] Fix byte conversion (#465)
* Fix byte conversion * Fix test
1 parent 1998539 commit 1e06328

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Commands/Concerns/InteractsWithIO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function requestInfo($request, $verbosity = null)
116116
$duration = number_format(round($request['duration'], 2), 2, '.', '');
117117

118118
$memory = isset($request['memory'])
119-
? (number_format($request['memory'] / 1024 / 1204, 2, '.', '').' mb ')
119+
? (number_format($request['memory'] / 1024 / 1024, 2, '.', '').' mb ')
120120
: '';
121121

122122
['method' => $method, 'statusCode' => $statusCode] = $request;

tests/CommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ public function test_request()
7575
]);
7676

7777
$this->assertEquals(<<<'EOF'
78-
200 GET /welcome ......... 14.11 mb 10.00 ms
79-
404 POST / ............. 16.54 mb 1234.00 ms
80-
500 POST /foofoofo... 24.65 mb 4567854.00 ms
78+
200 GET /welcome ......... 16.59 mb 10.00 ms
79+
404 POST / ............. 19.45 mb 1234.00 ms
80+
500 POST /foofoofo... 28.99 mb 4567854.00 ms
8181

8282
EOF, $output->fetch());
8383
}

0 commit comments

Comments
 (0)