public static function start($key = 'ALL') { if (!self::$xhprof && Config::getField('project', 'xhprof', 0) && \function_exists('xhprof_enable')) { require ZPHP::getLibPath() . DS . 'xhprof_lib' . DS . 'utils' . DS . 'xhprof_lib.php'; require ZPHP::getLibPath() . DS . 'xhprof_lib' . DS . 'utils' . DS . 'xhprof_runs.php'; \xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); self::$xhprof = true; } self::$records[$key]['start_time'] = self::getMicroTime(); self::$records[$key]['memory_use'] = memory_get_usage(); }