show session restore time

This commit is contained in:
Ralf Becker 2008-03-22 16:22:11 +00:00
parent 608e2ef249
commit ed5db11312
3 changed files with 9 additions and 8 deletions

View File

@ -165,9 +165,15 @@ class egw_framework
); );
if($GLOBALS['egw_info']['user']['preferences']['common']['show_generation_time']) if($GLOBALS['egw_info']['user']['preferences']['common']['show_generation_time'])
{ {
$totaltime = sprintf('%4.2lf',perfgetmicrotime() - $GLOBALS['egw_info']['flags']['page_start_time']); $totaltime = sprintf('%4.2lf',microtime(true) - $GLOBALS['egw_info']['flags']['page_start_time']);
$var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime).'</span></div>'; $var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime);
if ($GLOBALS['egw_info']['flags']['session_restore_time'])
{
$var['page_generation_time'] .= ' '.lang('(session restored in %1 seconds)',
sprintf('%4.2lf',$GLOBALS['egw_info']['flags']['session_restore_time']));
}
$var['page_generation_time'] .= '</span></div>';
} }
$var['powered_by'] = lang('Powered by').' <a href="'.$GLOBALS['egw_info']['server']['webserver_url'].'/about.php">eGroupWare</a> '.lang('version').' '.$GLOBALS['egw_info']['server']['versions']['phpgwapi']; $var['powered_by'] = lang('Powered by').' <a href="'.$GLOBALS['egw_info']['server']['webserver_url'].'/about.php">eGroupWare</a> '.lang('version').' '.$GLOBALS['egw_info']['server']['versions']['phpgwapi'];
$var['activate_tooltips'] = '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js" type="text/javascript"></script>'; $var['activate_tooltips'] = '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js" type="text/javascript"></script>';

View File

@ -89,6 +89,7 @@ if ($GLOBALS['egw_info']['server']['sessions_type'] == 'php4-restore' && $_REQUE
$GLOBALS['egw']->wakeup2(); // adapt the restored egw-object/enviroment to this request (eg. changed current app) $GLOBALS['egw']->wakeup2(); // adapt the restored egw-object/enviroment to this request (eg. changed current app)
//printf("<p style=\"position: absolute; right: 0px; top: 0px;\">egw-enviroment restored in %d ms</p>\n",1000*(perfgetmicrotime()-$GLOBALS['egw_info']['flags']['page_start_time'])); //printf("<p style=\"position: absolute; right: 0px; top: 0px;\">egw-enviroment restored in %d ms</p>\n",1000*(perfgetmicrotime()-$GLOBALS['egw_info']['flags']['page_start_time']));
$GLOBALS['egw_info']['flags']['session_restore_time'] = microtime(true) - $GLOBALS['egw_info']['flags']['page_start_time'];
if (is_object($GLOBALS['egw']->translation)) return; // exit this file, as the rest of the file creates a new egw-object and -enviroment if (is_object($GLOBALS['egw']->translation)) return; // exit this file, as the rest of the file creates a new egw-object and -enviroment
} }
// egw object could NOT be restored from the session, create a new one // egw object could NOT be restored from the session, create a new one

View File

@ -680,12 +680,6 @@ class idots_framework extends egw_framework
{ {
$content .= "</body>\n</html>\n"; // close body and html tag, eg. for popups $content .= "</body>\n</html>\n"; // close body and html tag, eg. for popups
} }
if (DEBUG_TIMER)
{
$totaltime = sprintf('%4.2lf',microtime(true) - $GLOBALS['egw_info']['flags']['page_start_time']);
$content .= lang('Page was generated in %1 seconds',$totaltime);
}
return $content; return $content;
} }
} }