From be5ccca2f99bb41575d2f57dc7bb37a448b8b17d Mon Sep 17 00:00:00 2001 From: Aleksei Miheev Date: Wed, 8 Jan 2014 23:39:29 +0400 Subject: [PATCH] More granular stats for db_query --- Sources/Subs.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Subs.php b/Sources/Subs.php index 7ebdaa6..6b5e47f 100644 --- a/Sources/Subs.php +++ b/Sources/Subs.php @@ -218,7 +218,8 @@ function db_query($db_string, $file, $line) global $db_cache, $db_count, $db_connection, $modSettings; $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2); - $timer = pinba_timer_start(array("component" => 'db_query', 'function' => $trace[1]['function'], 'file' => $file)); + $_file=str_replace('/var/www/rock/forum/','',$file); + $timer = pinba_timer_start(array("component" => 'db_query', 'function' => $trace[1]['function'], 'location' => "{$_file}:{$line}")); // One more query.... $db_count = !isset($db_count) ? 1 : $db_count + 1;