diff --git a/tests/Doctrine/Performance/LazyLoading/ProxyInstantiationTimeBench.php b/tests/Doctrine/Performance/LazyLoading/ProxyInstantiationTimeBench.php new file mode 100644 index 000000000..da5a2c94f --- /dev/null +++ b/tests/Doctrine/Performance/LazyLoading/ProxyInstantiationTimeBench.php @@ -0,0 +1,40 @@ +proxyFactory = EntityManagerFactory::getEntityManager([])->getProxyFactory(); + } + + public function benchCmsUserInstantiation() + { + for ($i = 0; $i < 100000; ++$i) { + $this->proxyFactory->getProxy(CmsUser::class, ['id' => $i]); + } + } + + public function benchCmsEmployeeInstantiation() + { + for ($i = 0; $i < 100000; ++$i) { + $this->proxyFactory->getProxy(CmsEmployee::class, ['id' => $i]); + } + } +} +