diff --git a/core/oql/expression.class.inc.php b/core/oql/expression.class.inc.php index 18f51354c..1f65b5c5b 100644 --- a/core/oql/expression.class.inc.php +++ b/core/oql/expression.class.inc.php @@ -178,7 +178,7 @@ abstract class Expression { abstract public function CollectUsedParents(&$aTable); /** - * @return boolean evaluation of the expression value, false if no conversion possible + * @return boolean true if the expression's value is constant and evaluates to true, false otherwise */ abstract public function IsTrue(); diff --git a/datamodels/2.x/itop-portal-base/portal/config/legacy_silex_compat_layer.php b/datamodels/2.x/itop-portal-base/portal/config/legacy_silex_compat_layer.php index 06e69d1d7..a92e34260 100644 --- a/datamodels/2.x/itop-portal-base/portal/config/legacy_silex_compat_layer.php +++ b/datamodels/2.x/itop-portal-base/portal/config/legacy_silex_compat_layer.php @@ -34,23 +34,30 @@ $oModuleDesign = new ModuleDesign($_ENV['PORTAL_ID']); // Load portal conf. such as properties, themes, templates, ... // Append into %combodo.portal.instance.conf% +$oKPI = new ExecutionKPI(); $oBasicCompat = new Basic($oModuleDesign); $oBasicCompat->Process($container); +$oKPI->ComputeAndReport('Load portal conf. such as properties, themes, templates, ...'); // Load portal forms definition // Append into %combodo.portal.instance.conf% +$oKPI = new ExecutionKPI(); $oFormsCompat = new Forms($oModuleDesign); $oFormsCompat->Process($container); +$oKPI->ComputeAndReport('Load portal forms definition'); // Load portal lists definition // Append into %combodo.portal.instance.conf% +$oKPI = new ExecutionKPI(); $oListsCompat = new Lists($oModuleDesign); $oListsCompat->Process($container); +$oKPI->ComputeAndReport('Load portal lists definition'); // Generating CSS files // Note: We do this here as it is not user dependent and therefore can be cached for everyone. // A dedicated listener 'CssFromSassCompiler' exists to compile files again when by-passing HTTP cache. // This is to keep developers comfort when tuning the SCSS files. +$oKPI = new ExecutionKPI(); $aImportPaths = array($_ENV['COMBODO_PORTAL_BASE_ABSOLUTE_PATH'].'css/'); $aPortalConf = $container->getParameter('combodo.portal.instance.conf'); foreach ($aPortalConf['properties']['themes'] as $sKey => $value) @@ -71,4 +78,6 @@ foreach ($aPortalConf['properties']['themes'] as $sKey => $value) $aPortalConf['properties']['themes'][$sKey] = $aValues; } } +$oKPI->ComputeAndReport('Generating CSS files'); + $container->setParameter('combodo.portal.instance.conf', $aPortalConf); \ No newline at end of file diff --git a/datamodels/2.x/itop-portal-base/portal/public/index.php b/datamodels/2.x/itop-portal-base/portal/public/index.php index 04d090984..b9b7539d2 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/index.php +++ b/datamodels/2.x/itop-portal-base/portal/public/index.php @@ -24,23 +24,38 @@ require_once MODULESROOT.'itop-portal-base/portal/config/bootstrap.php'; // Stacking context tag so it knows we are in the portal $oContext = new ContextTag(ContextTag::TAG_PORTAL); -$oContext2 = new ContextTag('Portal:' . $_ENV['PORTAL_ID']); +$oContext2 = new ContextTag('Portal:'.$_ENV['PORTAL_ID']); + + +$oKPI = new ExecutionKPI(); // Note: Manually refactored ternary condition to be PHP 5.x compatible -if ($trustedProxies = isset($_SERVER['TRUSTED_PROXIES']) ? $_SERVER['TRUSTED_PROXIES'] : (isset($_ENV['TRUSTED_PROXIES']) ? $_ENV['TRUSTED_PROXIES'] : false)) -{ +if ($trustedProxies = isset($_SERVER['TRUSTED_PROXIES']) ? $_SERVER['TRUSTED_PROXIES'] : (isset($_ENV['TRUSTED_PROXIES']) ? $_ENV['TRUSTED_PROXIES'] : false)) { Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); } // Note: Manually refactored ternary condition to be PHP 5.x compatible -if ($trustedHosts = isset($_SERVER['TRUSTED_HOSTS']) ? $_SERVER['TRUSTED_HOSTS'] : (isset($_ENV['TRUSTED_HOSTS']) ? $_ENV['TRUSTED_HOSTS'] : false)) -{ +if ($trustedHosts = isset($_SERVER['TRUSTED_HOSTS']) ? $_SERVER['TRUSTED_HOSTS'] : (isset($_ENV['TRUSTED_HOSTS']) ? $_ENV['TRUSTED_HOSTS'] : false)) { Request::setTrustedHosts([$trustedHosts]); } $oKernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']); +$oKPI->ComputeAndReport('Symfony kernel init'); + +$oKPI = new ExecutionKPI(); $oRequest = Request::createFromGlobals(); +$oKPI->ComputeAndReport('Symfony request parsing/creation'); + +$oKPI = new ExecutionKPI(); /** @noinspection PhpUnhandledExceptionInspection */ $oResponse = $oKernel->handle($oRequest); $oResponse->send(); +$oKPI->ComputeAndReport('Page execution and rendering'); + + +$oKPI = new ExecutionKPI(); $oKernel->terminate($oRequest, $oResponse); +$oKPI->ComputeAndReport('Symfony kernel termination'); + + +ExecutionKPI::ReportStats(); \ No newline at end of file