cbdt / query-diet
Query monitoring and discreet display of query count and execution time.
v1.0.1
2023-06-23 08:15 UTC
Requires
- php: ^8.0
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
This package is auto-updated.
Last update: 2024-04-09 04:42:58 UTC
README
Query monitoring and discreet display of query count and execution time in the Laravel app.
This is a Query Diet having a good diet (6 queries, 0.5ms):
This is a Query Diet having a bad diet (28 queries, 79ms):
This project is a port of the Ruby gem query_diet to Laravel.
Support us
Installation
You can install the package via composer:
composer require cbdt/query-diet
You can publish the config file with:
php artisan vendor:publish --tag="query-diet-config"
This is the contents of the published config file:
return [ 'enabled' => env('QUERY_DIET_ENABLED', true), 'bad_query_time_ms' => env('QUERY_DIET_BAD_QUERY_TIME_MS', 100), 'bad_query_count' => env('QUERY_DIET_BAD_QUERY_COUNT', 10), ];
Usage
You'll see on the top right of your screen a small badge with the number of queries executed during the request.
Credits
License
The MIT License (MIT). Please see License File for more information.