Skip to content
Snippets Groups Projects
Commit ddf6e20b authored by Laurent's avatar Laurent
Browse files

dev #37100 add helper to profile some code in unit tests

parent 511cb4d6
Branches
Tags
10 merge requests!1587Master,!1553Master,!1519Master,!1505Stable,!1502Master,!1501Stable,!1491Master,!1490Hotline master,!1489Stable,!1476Dev#37100 optimisation du code cote navigateur pour casqy
...@@ -307,6 +307,22 @@ abstract class AbstractControllerTestCase extends Zend_Test_PHPUnit_ControllerTe ...@@ -307,6 +307,22 @@ abstract class AbstractControllerTestCase extends Zend_Test_PHPUnit_ControllerTe
$this->fail("Flash messenger contains a popup"); $this->fail("Flash messenger contains a popup");
} }
} }
public function xhprofile($closure) {
xhprof_enable();
$closure();
$xhprof_data = xhprof_disable();
require_once "xhprof/xhprof_lib/utils/xhprof_lib.php";
require_once "xhprof/xhprof_lib/utils/xhprof_runs.php";
$xhprof_runs = new XHProfRuns_Default();
$run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_testing");
var_dump('XHProfile data: ' . BASE_URL."/xhprof/xhprof_html/index.php?run={$run_id}&source=xhprof_testing");
}
} }
?> ?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment