summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-12-23 21:47:02 +0000
committerDries Buytaert <dries@buytaert.net>2001-12-23 21:47:02 +0000
commit8c8b305892f3bc66b062a4fd6b46ec37278f0769 (patch)
treeaa7e79aeee29a82e260dfc144ff4d12e0e232110 /includes/common.inc
parent2ac4e99feb1c71004a8d3d37ac848e6c8cd65e2d (diff)
downloadbrdo-8c8b305892f3bc66b062a4fd6b46ec37278f0769.tar.gz
brdo-8c8b305892f3bc66b062a4fd6b46ec37278f0769.tar.bz2
- Added "query log" functionality to Drupal. Inspired by weitzman's
code/patch.
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 86a7ae9f7..3e5d6f936 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -422,7 +422,14 @@ function timer_print() {
global $timer;
$stop = explode(" ", microtime());
$diff = $stop[0] - $timer[0];
- print "<PRE>execution time: $diff ms</PRE>";
+ print "<pre>execution time: $diff ms</pre>";
+}
+
+function query_print() {
+ global $queries;
+ print "<pre>";
+ print_r($queries);
+ print "</pre>";
}
function page_header() {
@@ -443,6 +450,10 @@ function page_footer() {
timer_print();
}
+ if (variable_get("dev_query", 0)) {
+ query_print();
+ }
+
if (variable_get("cache", 0)) {
cache_set();
}