andrey-mokhov / bjy-profiler
Database profiler for Zend\Db (also plugin for ZendDeveloperTools). Module forked from bjyoungblood/bjy-profiler
Installs: 41 976
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 4
Forks: 55
Open Issues: 0
Requires
- php: ^5.5 || ^7.0
- zendframework/zend-db: ^2.7
- zendframework/zend-log: ^2.7
- zendframework/zend-modulemanager: ^2.7
- zendframework/zend-servicemanager: ^3.0.3
Requires (Dev)
- phpunit/phpunit: ^4.0 || ^5.0
- zendframework/zend-mvc: ^2.7 || ^3.0
This package is auto-updated.
Last update: 2024-12-24 18:59:07 UTC
README
Provides Zend\Db adapters with extensions for database query profiling, as well as a profiler similar to ZF1's Zend_Db_Profiler. I ported much of this code from ZF1's Zend_Db.
Note: this module now works with Zend\Db's built-in profiler.
Note: PHP >= 5.5 is required for stack traces with query profiles.
Composer/Packagist Users
composer require --dev andrey-mokhov/bjy-profiler
Configuration & Usage
Add BjyProfiler
to your development.config.php
in section modules
, example:
return [ // Additional modules to include when in development mode 'modules' => [ 'ZendDeveloperTools', 'BjyProfiler', ], // Configuration overrides during development mode 'module_listener_options' => [ 'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}-development.php'], 'config_cache_enabled' => false, 'module_map_cache_enabled' => false, ], ];
$profiler = $sl->get('Zend\Db\Adapter\Adapter')->getProfiler(); $queryProfiles = $profiler->getQueryProfiles();