Skip to content

Commit

Permalink
- round RAM usage to 2 decimals
Browse files Browse the repository at this point in the history
- do not require php 7.0
  • Loading branch information
chojnicki committed Jul 14, 2019
1 parent e85fc87 commit a8ca0ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
}
],
"require": {
"php": "^7.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Seeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public function __destruct()

/* Debug RAM usage */
$RAMUsage = memory_get_usage();
$RAMUsage = round($RAMUsage / 1024 / 1024); // to MB
$RAMUsage = round($RAMUsage / 1024 / 1024, 2); // to MB
$RAMUsagePeak = memory_get_peak_usage();
$RAMUsagePeak = round($RAMUsagePeak / 1024 / 1024); // to MB
$RAMUsagePeak = round($RAMUsagePeak / 1024 / 1024, 2); // to MB

$this->command->info('Current RAM usage is ' . $RAMUsage . 'MB with peak during execution ' . $RAMUsagePeak . 'MB.');
}
Expand Down

0 comments on commit a8ca0ca

Please sign in to comment.