merge slow-page-log into tracer, fixes #673

This commit is contained in:
Shish
2019-07-07 13:51:19 +01:00
parent 99646a4b00
commit 4cadce1de0
4 changed files with 8 additions and 20 deletions

View File

@@ -390,19 +390,6 @@ function get_debug_info(): string
return $debug;
}
function log_slow(): void
{
global $_shm_load_start;
if (!is_null(SLOW_PAGES)) {
$_time = microtime(true) - $_shm_load_start;
if ($_time > SLOW_PAGES) {
$_query = _get_query();
$_dbg = get_debug_info();
file_put_contents("data/slow-pages.log", "$_time $_query $_dbg\n", FILE_APPEND | LOCK_EX);
}
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Request initialisation stuff *