Laravel Packages

Artisan Benchmark

Published
Artisan Benchmark image

Laravel core team member Christoph Rumpel, in a recent video, demonstrated a new package that he created called Artisan Benchmark. The package allows you to benchmark your Artisan commands to get metrics such as:

  • Execution Time
  • Memory Usage
  • SQL Query Count
  • Number of Rows returned/affected

You can install this package using Composer:

composer require christophrumpel/artisan-benchmark

Then benchmark your command using:

php artisan benchmark your:command

If you don't pass in your command as an argument, it will display a list of available commands.

Note: this package only tracks query counts for queries executed through Eloquent or the Query Builder. However, contributions are welcomed to improve the package.

To learn more about this package, you can view the source code on Github.

Yannick Lyn Fatt photo

Staff Writer at Laravel News and Full stack web developer.

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
CPX: The Composer Package Executor for PHP image

CPX: The Composer Package Executor for PHP

Read article
Laravel AI SDK Adds Human-in-the-Loop Tool Approval image

Laravel AI SDK Adds Human-in-the-Loop Tool Approval

Read article
Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals image

Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals

Read article
Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs image

Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs

Read article
Blade Formatting in Laravel Pint image

Blade Formatting in Laravel Pint

Read article
Inertia DevTools Is Now on the Chrome Web Store image

Inertia DevTools Is Now on the Chrome Web Store

Read article