From d4d19569eeecb16e9064e47f47ca503afba469a5 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Thu, 11 Jul 2024 10:52:47 -0700 Subject: [PATCH] adds execution timer --- app/Console/Commands/RemoveExplicitEols.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Console/Commands/RemoveExplicitEols.php b/app/Console/Commands/RemoveExplicitEols.php index 03163a475..f5164c2ee 100644 --- a/app/Console/Commands/RemoveExplicitEols.php +++ b/app/Console/Commands/RemoveExplicitEols.php @@ -27,6 +27,8 @@ class RemoveExplicitEols extends Command */ public function handle() { + $startTime = microtime(true); + if ($this->option('model_name') == 'all') { $assets = Asset::all(); $this->updateAssets($assets); @@ -40,6 +42,9 @@ class RemoveExplicitEols extends Command $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)