mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 09:34:10 -08:00
adds execution timer
This commit is contained in:
parent
43c7504f89
commit
d4d19569ee
|
@ -27,6 +27,8 @@ class RemoveExplicitEols extends Command
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
$startTime = microtime(true);
|
||||||
|
|
||||||
if ($this->option('model_name') == 'all') {
|
if ($this->option('model_name') == 'all') {
|
||||||
$assets = Asset::all();
|
$assets = Asset::all();
|
||||||
$this->updateAssets($assets);
|
$this->updateAssets($assets);
|
||||||
|
@ -40,6 +42,9 @@ class RemoveExplicitEols extends Command
|
||||||
$this->error('Asset model not found');
|
$this->error('Asset model not found');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$endTime = microtime(true);
|
||||||
|
$executionTime = ($endTime - $startTime);
|
||||||
|
$this->info('Command executed in ' . round($executionTime, 2) . ' seconds.');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function updateAssets($assets)
|
private function updateAssets($assets)
|
||||||
|
|
Loading…
Reference in a new issue