Index: trunk/kernel/include/debugger.php
===================================================================
diff -u -r3685 -r3815
--- trunk/kernel/include/debugger.php (.../debugger.php) (revision 3685)
+++ trunk/kernel/include/debugger.php (.../debugger.php) (revision 3815)
@@ -70,6 +70,7 @@
var $OptionsMap = Array('shutdown_func' => 1, 'error_handler' => 2,
'output_buffer' => 4, 'highlight_output' => 8);
+ var $scrollbarWidth = 0;
var $longErrors=Array();
@@ -86,12 +87,17 @@
var $reportDone = false;
+ var $dummyImage = 'http://www.adamauto.lv/chevrolet/images/spacer.gif';
+
function Debugger()
{
$this->profileStart('kernel4_startup', 'Startup and Initialization of kernel4');
$this->profileStart('script_runtime', 'Script runtime');
ini_set('display_errors',dbg_ConstOn('DBG_ZEND_PRESENT')?0:1);
$this->memoryUsage['error_handling']=0; // memory amount used by error handler
+
+ $this->scrollbarWidth = $this->isGecko() ? 22 : 25;
+ dbg_safeDefine('DBG_WINDOW_WIDTH', 700);
$this->appendRequest();
}
@@ -209,7 +215,29 @@
$profileKey = $Data['profile_key'];
$Data =& $this->ProfilerData[$profileKey];
$runtime = ($Data['ends'] - $Data['begins']); // in seconds
+
+
+ $totals_key = getArrayValue($Data, 'totalsKey');
+ if ($totals_key) {
+ $total_before = $Data['totalsBefore'];
+ $total = $this->ProfilerTotals[$totals_key];
+
+ $div_width = Array();
+ $div_width['before'] = ($total_before / $total) * $this->getWindowWidth();
+ $div_width['current'] = ($runtime / $total) * $this->getWindowWidth();
+ $div_width['left'] = (($total - $total_before - $runtime) / $total) * $this->getWindowWidth();
+
+ $ret = 'Name: '.$Data['description'].'
';
+ $ret .= 'Runtime: '.$runtime.'s';
+ $ret .= '
Src | Name | Value | @@ -472,6 +508,12 @@ if (!isset($value)) { $value = $this->ProfilerData[$key]['ends'] - $this->ProfilerData[$key]['begins']; } + + if (isset($key)) { + $this->ProfilerData[$key]['totalsKey'] = $total_key; + $this->ProfilerData[$key]['totalsBefore'] = $this->ProfilerTotals[$total_key]; + } + $this->ProfilerTotals[$total_key] += $value; $this->ProfilerTotalCount[$total_key]++; } @@ -541,7 +583,6 @@ if( dbg_ConstOn('DBG_ZEND_PRESENT') ) return; dbg_safeDefine('DBG_RAISE_ON_WARNINGS',0); - dbg_safeDefine('DBG_WINDOW_WIDTH', 700); $this->memoryUsage['debugger_start']=memory_get_usage(); @@ -602,6 +643,13 @@ ?>