mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Finalize debug data format and allow all statistics to be collected
This commit is contained in:
parent
8394afce74
commit
ac8460d782
10 changed files with 140 additions and 141 deletions
|
|
@ -42,16 +42,13 @@ class TemplateHandler
|
|||
{
|
||||
static $oTemplate = NULL;
|
||||
|
||||
if(__DEBUG__ == 3)
|
||||
if(!isset($GLOBALS['__TemplateHandlerCalled__']))
|
||||
{
|
||||
if(!isset($GLOBALS['__TemplateHandlerCalled__']))
|
||||
{
|
||||
$GLOBALS['__TemplateHandlerCalled__'] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['__TemplateHandlerCalled__']++;
|
||||
}
|
||||
$GLOBALS['__TemplateHandlerCalled__'] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['__TemplateHandlerCalled__']++;
|
||||
}
|
||||
|
||||
if(!$oTemplate)
|
||||
|
|
@ -118,10 +115,7 @@ class TemplateHandler
|
|||
public function compile($tpl_path, $tpl_filename, $tpl_file = '')
|
||||
{
|
||||
// store the starting time for debug information
|
||||
if(__DEBUG__ == 3)
|
||||
{
|
||||
$start = microtime(true);
|
||||
}
|
||||
$start = microtime(true);
|
||||
|
||||
// initiation
|
||||
$this->init($tpl_path, $tpl_filename, $tpl_file);
|
||||
|
|
@ -155,10 +149,7 @@ class TemplateHandler
|
|||
}
|
||||
|
||||
// store the ending time for debug information
|
||||
if(__DEBUG__ == 3)
|
||||
{
|
||||
$GLOBALS['__template_elapsed__'] += microtime(true) - $start;
|
||||
}
|
||||
$GLOBALS['__template_elapsed__'] += microtime(true) - $start;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue