N°3985 - Performance checks on the back end

This commit is contained in:
Eric
2021-08-23 13:57:03 +02:00
parent ffbd94d671
commit 2c2155a8e0
35 changed files with 747 additions and 241 deletions

View File

@@ -79,6 +79,7 @@ class JsonPage extends WebPage
*/
public function output()
{
$oKpi = new ExecutionKPI();
$this->add_header('Content-type: application/json');
foreach ($this->a_headers as $s_header) {
@@ -91,11 +92,13 @@ class JsonPage extends WebPage
'data' => $this->aData,
'scripts' => $aScripts,
];
$oKpi->ComputeAndReport(get_class($this).' prepare output');
$oKpi = new ExecutionKPI();
$sJSON = json_encode($aJson);
echo $sJSON;
$oKpi->ComputeAndReport('Echoing ('.round(strlen($sJSON) / 1024).' Kb)');
ExecutionKPI::ReportStats();
}
}