From e9757363bf514ae5f3239a8926817475724e0c03 Mon Sep 17 00:00:00 2001 From: diosmosis Date: Sun, 19 Apr 2015 22:19:12 -0700 Subject: Do not use static container in profiler setup and call xhprof_enable after setProfilingRunIds. --- core/Profiler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/Profiler.php') diff --git a/core/Profiler.php b/core/Profiler.php index 50caea0adc..e842994a8f 100644 --- a/core/Profiler.php +++ b/core/Profiler.php @@ -239,12 +239,12 @@ class Profiler $profilerNamespace .= "-" . $currentGitBranch; } - xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); - if ($mainRun) { self::setProfilingRunIds(array()); } + xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); + register_shutdown_function(function () use($profilerNamespace, $mainRun) { $xhprofData = xhprof_disable(); $xhprofRuns = new XHProfRuns_Default(); @@ -337,6 +337,6 @@ class Profiler */ private static function getPathToXHProfRunIds() { - return StaticContainer::get('path.tmp') . '/cache/tests-xhprof-runs'; + return PIWIK_INCLUDE_PATH . '/tmp/cache/tests-xhprof-runs'; } } -- cgit v1.2.3