aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Diagnostics/Query.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-08-24 14:37:15 +0200
committerRobin Appelman <robin@icewind.nl>2016-08-24 14:37:15 +0200
commit1c3b1e5797da8a7a398a59a353e1616ba518fc59 (patch)
tree79b13f1607f80a3b9e6e314193bf52de271c19e6 /lib/private/Diagnostics/Query.php
parent8d8366762be728f10af7ae9e465dcdba727d0eaf (diff)
downloadnextcloud-server-1c3b1e5797da8a7a398a59a353e1616ba518fc59.tar.gz
nextcloud-server-1c3b1e5797da8a7a398a59a353e1616ba518fc59.zip
add stacktrace to query logger
Diffstat (limited to 'lib/private/Diagnostics/Query.php')
-rw-r--r--lib/private/Diagnostics/Query.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/private/Diagnostics/Query.php b/lib/private/Diagnostics/Query.php
index 908ad17f9db..8ac2cc0eeac 100644
--- a/lib/private/Diagnostics/Query.php
+++ b/lib/private/Diagnostics/Query.php
@@ -34,15 +34,18 @@ class Query implements IQuery {
private $end;
+ private $stack;
+
/**
* @param string $sql
* @param array $params
* @param int $start
*/
- public function __construct($sql, $params, $start) {
+ public function __construct($sql, $params, $start, array $stack) {
$this->sql = $sql;
$this->params = $params;
$this->start = $start;
+ $this->stack = $stack;
}
public function end($time) {
@@ -69,4 +72,12 @@ class Query implements IQuery {
public function getDuration() {
return $this->end - $this->start;
}
+
+ public function getStartTime() {
+ return $this->start;
+ }
+
+ public function getStacktrace() {
+ return $this->stack;
+ }
}