aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/elgglib.php5
-rw-r--r--engine/start.php6
2 files changed, 10 insertions, 1 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 9d677a483..81c38e0d5 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -2167,7 +2167,12 @@
*/
function __elgg_shutdown_hook()
{
+ global $CONFIG, $START_MICROTIME;
+
trigger_elgg_event('shutdown', 'system');
+
+ if ($CONFIG->debug)
+ error_log("Page {$_SERVER['REQUEST_URI']} generated in ".(float)(microtime(true)-$START_MICROTIME)." seconds");
}
function elgg_init() {
diff --git a/engine/start.php b/engine/start.php
index e967d292e..a80cf982f 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -12,7 +12,11 @@
* @link http://elgg.org/
*/
-
+ /*
+ * Basic profiling
+ */
+ global $START_MICROTIME;
+ $START_MICROTIME = microtime(true);
/**
* Load important prerequisites