/** * Execute the console command. * * @return mixed */ public function handle() { $benchmarck = new Benchmark(); $benchmarck->start(); $mdiff = new MdiffNotes(); $qtdMdiff = $mdiff->make(); $this->info($qtdMdiff . " Diferenças calculadas."); $this->info("Tem decorrido: " . $benchmarck->stop()->elapsedSeconds()); }
/** * Execute the console command. * * @return mixed */ public function handle() { $benchmarck = new Benchmark(); $benchmarck->start(); $qtd = $this->argument('qtd'); if (!is_numeric($qtd)) { $this->error('O parametro qtd deve ser um numero inteiro'); return; } $ratedMovies = RateMovies::doAction($qtd); $this->info($ratedMovies . ' avaliações realizadas.'); $this->info("Tem decorrido: " . $benchmarck->stop()->elapsedSeconds()); }
/** * Execute the console command. * * @return mixed */ public function handle() { $benchmarck = new Benchmark(); $benchmarck->start(); $qtdCriar = $this->argument('qtd'); if (!is_numeric($qtdCriar)) { $this->error('Parametro qtd deve ser um numero inteiro.'); return; } $qtdUsers = User::query()->count(); $until = $qtdUsers + $qtdCriar; for ($qtdUsers; $qtdUsers < $until; $qtdUsers++) { User::create(['name' => 'Usuário ' . ($qtdUsers + 1)]); } $this->info("Usuarios criados com sucesso!"); $this->info("Tem decorrido: " . $benchmarck->stop()->elapsedSeconds()); }