$GLOBALS['logHandler'] = $logHandler; #----------------------------------------------------------------------------- # 二级命令黑名单,用来过滤statistic日志的记录,Statistic::report()中使用 #----------------------------------------------------------------------------- $GLOBALS['blacklist_cmd2'] = array('741' => 0, '421' => 0); /* if(rand(1,10000000) > 10000){ if(function_exists('xhprof_enable')){ xhprof_enable(); $scriptStartTime = microtime(true); register_shutdown_function('save_xhprof'); } } */ Statistic::init(); ############################################################# function save_xhprof() { global $scriptStartTime, $arrCmd; if (empty($arrCmd)) { return; } $runScriptTime = microtime(true) - $scriptStartTime; $costMemory = memory_get_usage(true); if ($runScriptTime < 0.05) { return true; } $data = xhprof_disable(); $date = date("Ymd", time()); include_once PROJECT_ROOT . "/xhprof/xhprof_lib/utils/xhprof_lib.php";