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