Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-11-27 14:55:30 +0400
committermattab <matthieu.aubry@gmail.com>2013-11-27 14:55:30 +0400
commit455c11e98418485e2835d39eaeec5c331b9a98a9 (patch)
tree5c6ac61b0309877bd1b6209ee85dc654bb83694f /core/Profiler.php
parent94bbcaaa621dcc52bdd8ef672c9175ad5a8f424b (diff)
Adding new hook to enrich Conversions + minor changes
Diffstat (limited to 'core/Profiler.php')
-rw-r--r--core/Profiler.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/core/Profiler.php b/core/Profiler.php
index 712c0e27eb..d4141f472c 100644
--- a/core/Profiler.php
+++ b/core/Profiler.php
@@ -200,6 +200,10 @@ class Profiler
return;
}
+ if(!function_exists('xhprof_enable')) {
+ return;
+ }
+
require_once $path;
require_once PIWIK_INCLUDE_PATH . '/tests/lib/xhprof-0.9.4/xhprof_lib/utils/xhprof_lib.php';
@@ -234,17 +238,22 @@ class Profiler
if($mainRun) {
$runIds = implode(',', $runs);
- $out = "\n\nHere is the profiler URL aggregating all runs triggered from this process: ";
+ $out = "\n\n";
$baseUrl = "http://" . @$_SERVER['HTTP_HOST'] . "/" . @$_SERVER['REQUEST_URI'];
$baseUrlStored = SettingsPiwik::getPiwikUrl();
if(strlen($baseUrlStored) > strlen($baseUrl)) {
$baseUrl = $baseUrlStored;
}
- $baseUrl = "\n\n" . $baseUrl
+ $baseUrl = "\n" . $baseUrl
."tests/lib/xhprof-0.9.4/xhprof_html/?source=$profilerNamespace&run=";
- $out .= $baseUrl . "$runIds\n\n";
- $out .= "Main run profile:";
- $out .= $baseUrl . "$runId\n\n";
+
+ $out .= "Profiler report is available at:";
+ $out .= $baseUrl . $runId;
+ if($runId != $runIds) {
+ $out .= "\n\nProfiler Report aggregating all runs triggered from this process: ";
+ $out .= $baseUrl . $runIds;
+ }
+ $out .= "\n\n";
echo ($out);
} else {
self::setProfilingRunIds($runs);