Closed Christopher-HM closed 9 months ago
Hello @LordSimal,
For certain queries the "took" key is not returned in the response.
"took"
Here is a small correction to apply in the \DebugKit\Database\Log\DebugLog.php file:
\DebugKit\Database\Log\DebugLog.php
// This specific to Elastic Search if (!$query instanceof LoggedQuery && isset($context['request']) && isset($context['response'])) { $took = $context['response']['took'] ?? 0; // Added !!! $this->_totalTime += $took; // Modified !!! $this->_queries[] = [ 'query' => json_encode([ 'method' => $context['request']['method'], 'path' => $context['request']['path'], 'data' => $context['request']['data'], ], JSON_PRETTY_PRINT), 'took' => $took, // Modified !!! 'rows' => $context['response']['hits']['total']['value'] ?? $context['response']['hits']['total'] ?? 0, ]; return; }
Thanks!
Hello @LordSimal,
For certain queries the
"took"
key is not returned in the response.Here is a small correction to apply in the
\DebugKit\Database\Log\DebugLog.php
file:Thanks!