From 2ce0bf4acc625f06a9309f4598968ca4f6ae3a39 Mon Sep 17 00:00:00 2001 From: Guillaume Lajarige Date: Fri, 31 Mar 2017 13:02:16 +0000 Subject: [PATCH] =?UTF-8?q?(Retrofit=20from=20trunk)=20N=C2=B0800=20Portal?= =?UTF-8?q?:=20log=5Fkpi=5Fduration=20/=20log=5Fkpi=5Fmemory=20are=20now?= =?UTF-8?q?=20supported=20by=20the=20portal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:2.3[4641] --- datamodels/2.x/itop-portal-base/portal/web/index.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/datamodels/2.x/itop-portal-base/portal/web/index.php b/datamodels/2.x/itop-portal-base/portal/web/index.php index 6fd298cbe..088af6478 100644 --- a/datamodels/2.x/itop-portal-base/portal/web/index.php +++ b/datamodels/2.x/itop-portal-base/portal/web/index.php @@ -62,6 +62,7 @@ if (!defined('DISABLE_DATA_LOCALIZER_PORTAL')) $bDebug = (isset($_REQUEST['debug']) && ($_REQUEST['debug'] === 'true') ); // Initializing Silex framework +$oKPI = new ExecutionKPI(); $oApp = new Silex\Application(); // Registring optional silex components @@ -76,6 +77,7 @@ $oApp->register(new Silex\Provider\TwigServiceProvider(), array( 'twig.path' => MODULESROOT )); $oApp->register(new Silex\Provider\HttpFragmentServiceProvider()); +$oKPI->ComputeAndReport('Initialization of the Silex application'); // Configuring Silex application $oApp['debug'] = $bDebug; @@ -91,17 +93,27 @@ $oApp['combodo.portal.instance.routes'] = array(); ApplicationHelper::RegisterExceptionHandler($oApp); // Preparing portal foundations (Can't use Silex autoload through composer as we don't follow PSR conventions -filenames, functions-) +$oKPI = new ExecutionKPI(); ApplicationHelper::LoadControllers(); ApplicationHelper::LoadRouters(); ApplicationHelper::RegisterRoutes($oApp); ApplicationHelper::LoadBricks(); ApplicationHelper::LoadFormManagers(); ApplicationHelper::RegisterTwigExtensions($oApp); +$oKPI->ComputeAndReport('Loading portal files (routers, controllers, ...)'); // Loading portal configuration from the module design +$oKPI = new ExecutionKPI(); ApplicationHelper::LoadPortalConfiguration($oApp); +$oKPI->ComputeAndReport('Parsing portal configuration'); // Loading current user ApplicationHelper::LoadCurrentUser($oApp); // Running application +$oKPI = new ExecutionKPI(); $oApp->run(); +$oKPI->ComputeAndReport('Page execution and rendering'); + +// Logging trace and stats +DBSearch::RecordQueryTrace(); +ExecutionKPI::ReportStats(); \ No newline at end of file