mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-28 01:10:51 +01:00
$config['debug']: Show time initializing Tinyboard (before $debug was created)
This commit is contained in:
parent
3fbd051737
commit
8257773807
@ -85,6 +85,7 @@ function loadConfig() {
|
|||||||
if (!isset($debug)) {
|
if (!isset($debug)) {
|
||||||
$debug = array('sql' => array(), 'exec' => array(), 'purge' => array(), 'cached' => array(), 'write' => array());
|
$debug = array('sql' => array(), 'exec' => array(), 'purge' => array(), 'cached' => array(), 'write' => array());
|
||||||
$debug['start'] = $microtime_start;
|
$debug['start'] = $microtime_start;
|
||||||
|
$debug['start_debug'] = microtime(true);;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,9 @@ function Element($templateFile, array $options) {
|
|||||||
if (isset($options['body']) && $config['debug']) {
|
if (isset($options['body']) && $config['debug']) {
|
||||||
if (isset($debug['start'])) {
|
if (isset($debug['start'])) {
|
||||||
$debug['time'] = '~' . round((microtime(true) - $debug['start']) * 1000, 2) . 'ms';
|
$debug['time'] = '~' . round((microtime(true) - $debug['start']) * 1000, 2) . 'ms';
|
||||||
|
$debug['time (initialization)'] = '~' . round(($debug['start_debug'] - $debug['start']) * 1000, 2) . 'ms';
|
||||||
unset($debug['start']);
|
unset($debug['start']);
|
||||||
|
unset($debug['start_debug']);
|
||||||
}
|
}
|
||||||
$debug['included'] = get_included_files();
|
$debug['included'] = get_included_files();
|
||||||
$debug['memory'] = round(memory_get_usage(true) / (1024 * 1024), 2) . ' MiB';
|
$debug['memory'] = round(memory_get_usage(true) / (1024 * 1024), 2) . ' MiB';
|
||||||
|
Loading…
Reference in New Issue
Block a user