Index: trunk/kernel/include/debugger.php
===================================================================
diff -u -r2567 -r2578
--- trunk/kernel/include/debugger.php (.../debugger.php) (revision 2567)
+++ trunk/kernel/include/debugger.php (.../debugger.php) (revision 2578)
@@ -504,15 +504,18 @@
$this->appendHTML('Hide Debugger');
$this->moveToBegin(1);
- if ( dbg_ConstOn('DBG_SQL_PROFILE') ) {
+ if( dbg_ConstOn('DBG_SQL_PROFILE') && getArrayValue($this->ProfilerTotals, 'sql') )
+ {
$this->appendHTML('SQL Total time: '.$this->ProfilerTotals['sql']);
}
- if ( dbg_ConstOn('DBG_PROFILE_MEMORY') ) {
+ if( dbg_ConstOn('DBG_PROFILE_MEMORY') )
+ {
$this->appendHTML('Memory used by Objects: '.round($this->ProfilerTotals['objects']/1024, 2).'Kb');
}
- if ( dbg_ConstOn('DBG_INCLUDED_FILES') ) {
+ if( dbg_ConstOn('DBG_INCLUDED_FILES') )
+ {
$files = get_included_files();
$this->appendHTML('Included files:');
foreach ($files as $file)
@@ -521,7 +524,8 @@
}
}
- if ( dbg_ConstOn('DBG_PROFILE_INCLUDES') ) {
+ if( dbg_ConstOn('DBG_PROFILE_INCLUDES') )
+ {
$this->appendHTML('Included files statistics:'.( dbg_ConstOn('DBG_SORT_INCLUDES_MEM') ? ' (sorted by memory usage)':''));
$totals = Array( 'mem' => 0, 'time' => 0);
$totals_configs = Array( 'mem' => 0, 'time' => 0);
@@ -542,8 +546,6 @@
$this->appendHTML('Sub-Total classes: '.' Mem: '.sprintf("%.4f Kb", $totals['mem']/1024).' Time: '.sprintf("%.4f", $totals['time']));
$this->appendHTML('Sub-Total configs: '.' Mem: '.sprintf("%.4f Kb", $totals_configs['mem']/1024).' Time: '.sprintf("%.4f", $totals_configs['time']));
$this->appendHTML('Grand Total: '.' Mem: '.sprintf("%.4f Kb", ($totals['mem']+$totals_configs['mem'])/1024).' Time: '.sprintf("%.4f", $totals['time']+$totals_configs['time']));
-
-
}