Skip to content
Snippets Groups Projects
Commit a745db03 authored by Demian Katz's avatar Demian Katz
Browse files

Added Tideways support.

parent 3efcd93f
No related merge requests found
...@@ -60,9 +60,10 @@ Alias /vufind /usr/local/vufind/public ...@@ -60,9 +60,10 @@ Alias /vufind /usr/local/vufind/public
# Uncomment this line to put VuFind into development mode in order to see more detailed messages: # Uncomment this line to put VuFind into development mode in order to see more detailed messages:
#SetEnv VUFIND_ENV development #SetEnv VUFIND_ENV development
# Uncomment this line if you want to use the XHProf profiler; this is a developer-oriented option # Uncomment this line if you want to use the XHProf or Tideways profiler; this is a
# that most users will not need. Make sure the XHProf PHP libraries are available on your include # developer-oriented option that most users will not need. Make sure the XHProf PHP
# path. See https://vufind.org/jira/browse/VUFIND-419 for more details. # libraries are available on your include path.
# See https://vufind.org/wiki/development:profiling for more details.
#SetEnv VUFIND_PROFILER_XHPROF http://url/to/your/xhprof/web/interface #SetEnv VUFIND_PROFILER_XHPROF http://url/to/your/xhprof/web/interface
# This line points to the local override directory where you should place your customized files # This line points to the local override directory where you should place your customized files
......
...@@ -7,6 +7,8 @@ use Zend\Mvc\Service\ServiceManagerConfig; ...@@ -7,6 +7,8 @@ use Zend\Mvc\Service\ServiceManagerConfig;
$xhprof = getenv('VUFIND_PROFILER_XHPROF'); $xhprof = getenv('VUFIND_PROFILER_XHPROF');
if (!empty($xhprof) && extension_loaded('xhprof')) { if (!empty($xhprof) && extension_loaded('xhprof')) {
xhprof_enable(); xhprof_enable();
} else if (extension_loaded('tideways')) {
tideways_enable();
} else { } else {
$xhprof = false; $xhprof = false;
} }
...@@ -82,9 +84,9 @@ Zend\Mvc\Application::init(require 'config/application.config.php')->run(); ...@@ -82,9 +84,9 @@ Zend\Mvc\Application::init(require 'config/application.config.php')->run();
// Handle final profiling details, if necessary: // Handle final profiling details, if necessary:
if ($xhprof) { if ($xhprof) {
$xhprofData = xhprof_disable(); $xhprofData = extension_loaded('xhprof') ? xhprof_disable() : tideways_disable();
include_once "xhprof_lib/utils/xhprof_lib.php"; require_once "xhprof_lib/utils/xhprof_lib.php";
include_once "xhprof_lib/utils/xhprof_runs.php"; require_once "xhprof_lib/utils/xhprof_runs.php";
$xhprofRuns = new XHProfRuns_Default(); $xhprofRuns = new XHProfRuns_Default();
$suffix = 'vufind'; $suffix = 'vufind';
$xhprofRunId = $xhprofRuns->save_run($xhprofData, $suffix); $xhprofRunId = $xhprofRuns->save_run($xhprofData, $suffix);
......
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