mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Add backtrace to ldap profiler collector
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
parent
0f0f132959
commit
25519b7089
2 changed files with 4 additions and 2 deletions
|
|
@ -28,12 +28,13 @@ use OCP\AppFramework\Http\Response;
|
|||
use OCP\DataCollector\AbstractDataCollector;
|
||||
|
||||
class LdapDataCollector extends AbstractDataCollector {
|
||||
public function startLdapRequest(string $query, array $args): void {
|
||||
public function startLdapRequest(string $query, array $args, array $backtrace): void {
|
||||
$this->data[] = [
|
||||
'start' => microtime(true),
|
||||
'query' => $query,
|
||||
'args' => $args,
|
||||
'end' => microtime(true),
|
||||
'backtrace' => $backtrace,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -330,7 +330,8 @@ class LDAP implements ILDAPWrapper {
|
|||
return $item;
|
||||
}, $this->curArgs);
|
||||
|
||||
$this->dataCollector->startLdapRequest($functionName, $args);
|
||||
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||
$this->dataCollector->startLdapRequest($functionName, $args, $backtrace);
|
||||
}
|
||||
|
||||
if ($this->logFile !== '' && is_writable(dirname($this->logFile)) && (!file_exists($this->logFile) || is_writable($this->logFile))) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue