/** * Metoda odpwoiada za zatrzymanie profilowania i zapisanie danych do bazy * Zapisane dane sa odczytywane przez XHProf GUI * * @access public * @static */ public static function stop() { $xhp_config = Xhprof_XHProfConfigFile::getInstance(); $xhprof_enabled = $xhp_config->checkXhprofEnabled(); if ($xhprof_enabled) { $xhprof_data = xhprof_disable(); $dbAdapter = $xhp_config->getDbAdapter(); $xhprof_runs = new Xhprof_XHProfRuns($dbAdapter); //save the run under a namespace "fold_xhprof" $xhprof_runs->save_run($xhprof_data, "sms_xhprof"); } }
/** * Zwraca instatncje obiektu Xhprof_XHProfConfigFile * * @return object Xhprof_XHProfConfigFile * @access public * @static */ public static function getInstance() { if (self::$oInstance == false) { self::$oInstance = new Xhprof_XHProfConfigFile(); } return self::$oInstance; }