diff options
author | diosmosis <benaka@piwik.pro> | 2015-04-20 08:19:12 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-04-20 08:19:12 +0300 |
commit | e9757363bf514ae5f3239a8926817475724e0c03 (patch) | |
tree | 289d195495a5f806f34e762086ce75d0921152df /core/Profiler.php | |
parent | f8fa0e26b842278df44e069b22b77cb633f048a9 (diff) |
Do not use static container in profiler setup and call xhprof_enable after setProfilingRunIds.
Diffstat (limited to 'core/Profiler.php')
-rw-r--r-- | core/Profiler.php | 6 |
1 files changed, 3 insertions, 3 deletions
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'; } } |