taishi

Get Accurate Query Execution Time

Posted 1 year ago by taishi

Hi,

Good day, I am trying to fetch all of the queries being ran on every request with they're execution time.

It works on the AppServiceProvider.php using DB::listen. Apparently, the variable $time doesn't seem to match the execution time it provides when I run the query on my database, the one being provided by the DB::listen seems to be longer than what I have on my database execution.

Not really sure if I'm doing this the wrong way. I am using Laravel 5.4 btw.

TIA!

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.