Skip to content

Commit

Permalink
[1.x] Fix byte conversion (#465)
Browse files Browse the repository at this point in the history
* Fix byte conversion

* Fix test
  • Loading branch information
apih authored Jan 25, 2022
1 parent 1998539 commit 1e06328
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Commands/Concerns/InteractsWithIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions tests/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 1e06328

Please sign in to comment.