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

serpapi logo
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi

The latest

View all →
Queue totalSize() and JobInterrupted Event in Laravel 13.31 image

Queue totalSize() and JobInterrupted Event in Laravel 13.31

Read article
Find Unexpected Test Inputs with Fuzz for Pest image

Find Unexpected Test Inputs with Fuzz for Pest

Read article
Laravel Rulebook: Business Rules That Change by Date image

Laravel Rulebook: Business Rules That Change by Date

Read article
Taylor disabled GitHub Issues on most Laravel open-source packages. image

Taylor disabled GitHub Issues on most Laravel open-source packages.

Read article
Exclude Vendor and Default Commands in `php artisan dev` image

Exclude Vendor and Default Commands in `php artisan dev`

Read article
The Laracon Archive image

The Laracon Archive

Read article