N°3985 - Performance checks on the back end - Enhance KPIs

This commit is contained in:
Eric Espie
2021-09-09 17:21:50 +02:00
parent 27c397cc1a
commit 15e99a898e
22 changed files with 119 additions and 78 deletions

View File

@@ -37,6 +37,7 @@ class XMLPage extends WebPage
function __construct($s_title, $bPassThrough = false)
{
$oKpi = new ExecutionKPI();
parent::__construct($s_title);
$this->m_bPassThrough = $bPassThrough;
$this->m_bHeaderSent = false;
@@ -44,6 +45,7 @@ class XMLPage extends WebPage
$this->no_cache();
$this->add_xframe_options();
$this->add_header("Content-location: export.xml");
$oKpi->ComputeStats(get_class($this).' creation', 'XMLPage');
}
public function output()
@@ -62,8 +64,7 @@ class XMLPage extends WebPage
{
header($s_header);
}
$oKpi->ComputeAndReport(get_class($this).' prepare output');
$oKpi = new ExecutionKPI();
$oKpi->ComputeAndReport(get_class($this).' output');
echo $this->s_content;
$oKpi->ComputeAndReport('Echoing ('.round(strlen($this->s_content) / 1024).' Kb)');
}