2017 © Pedro Peláez
 

library doctrine-stats

Count managed entities and lazy loaded entities, hydration time, etc

image

steevanb/doctrine-stats

Count managed entities and lazy loaded entities, hydration time, etc

  • Thursday, December 7, 2017
  • by kujaff
  • Repository
  • 2 Watchers
  • 10 Stars
  • 5,487 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 2 Forks
  • 0 Open issues
  • 14 Versions
  • 11 % Grown

The README.md

Version doctrine php Lines Total Downloads, (*1)

doctrine-stats

Add important Doctrine statistics: * Count managed entities * Count lazy loaded entities * Hydration time by hydrator and query * Group queries by query string, show differents parameters used by same query string * Count different query string used, (*2)

Changelog, (*3)

Installation

composer require --dev steevanb/doctrine-stats ^2.0

If you want to add hydration time to your statistics:, (*4)

composer.json, (*5)

{
    "autoload": {
        "psr-4": {
            "ComposerOverloadClass\\": "var/cache/ComposerOverloadClass"
        }
    },
    "scripts": {
        "pre-autoload-dump": "steevanb\\ComposerOverloadClass\\OverloadClass::overload"
    },
    "extra": {
        "composer-overload-cache-dir": "var/cache",
        "composer-overload-class-dev": {
            "Doctrine\\ORM\\Internal\\Hydration\\ArrayHydrator": {
                "original-file": "vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php",
                "overload-file": "vendor/steevanb/doctrine-stats/src/Bridge/ComposerOverloadClass/Doctrine/ORM/Internal/ArrayHydrator.php"
            },
            "Doctrine\\ORM\\Internal\\Hydration\\ObjectHydrator": {
                "original-file": "vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php",
                "overload-file": "vendor/steevanb/doctrine-stats/src/Bridge/ComposerOverloadClass/Doctrine/ORM/Internal/ObjectHydrator.php"
            },
            "Doctrine\\ORM\\Internal\\Hydration\\ScalarHydrator": {
                "original-file": "vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php",
                "overload-file": "vendor/steevanb/doctrine-stats/src/Bridge/ComposerOverloadClass/Doctrine/ORM/Internal/ScalarHydrator.php"
            },
            "Doctrine\\ORM\\Internal\\Hydration\\SimpleObjectHydrator": {
                "original-file": "vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php",
                "overload-file": "vendor/steevanb/doctrine-stats/src/Bridge/ComposerOverloadClass/Doctrine/ORM/Internal/SimpleObjectHydrator.php"
            },
            "Doctrine\\ORM\\Internal\\Hydration\\SingleScalarHydrator": {
                "original-file": "vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php",
                "overload-file": "vendor/steevanb/doctrine-stats/src/Bridge/ComposerOverloadClass/Doctrine/ORM/Internal/SingleScalarHydrator.php"
            }
        }
    }
}

```bash composer dumpautoload, (*6)


### Symfony 2.x, 3.x and 4.x integration Read Installation paragraph before. ```php # app/AppKernel.php class AppKernel { public function registerBundles() { if ($this->getEnvironment() === 'dev') { $bundles[] = new \Steevanb\DoctrineStats\Bridge\DoctrineStatsBundle\DoctrineStatsBundle(); } } }

If you want to add lazy loaded entities to your statistics:, (*7)

# app/config/config_dev.yml
parameters:
    doctrine.orm.entity_manager.class: Steevanb\DoctrineStats\Doctrine\ORM\EntityManager

Manual integration

To retrieve statistics, you need to register Steevanb\DoctrineStats\EventSubscriber\DoctrineEventSubscriber in your event manager., (*8)

If you want to add lazy loaded entities to your statistics, you need to overload default EntityManager, with Steevanb\DoctrineStats\Doctrine\ORM\EntityManager., (*9)

Screenshots

Symfony profiler, (*10)

Symfony profiler panel, (*11)

The Versions

07/12 2017

dev-master

9999999-dev

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

07/12 2017

1.3.3

1.3.3.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

17/11 2017

1.3.2

1.3.2.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

09/08 2017

1.3.1

1.3.1.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

09/08 2017

1.3.0

1.3.0.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

13/04 2017

dev-master-1.2

dev-master-1.2

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

13/04 2017

1.2.1

1.2.1.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

15/03 2017

dev-show-query-rows

dev-show-query-rows

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

11/10 2016

1.2.0

1.2.0.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

17/08 2016

1.1.0

1.1.0.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

10/08 2016

1.0.3

1.0.3.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

08/08 2016

1.0.2

1.0.2.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

05/08 2016

1.0.1

1.0.1.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires

 

21/07 2016

1.0.0

1.0.0.0

Count managed entities and lazy loaded entities, hydration time, etc

  Sources   Download

MIT

The Requires