Skip to content

Query time unit does not match with Laravel eco-system #3441

@mshamaseen

Description

@mshamaseen
  • Laravel-mongodb Version: 5.2
  • PHP Version: 8.3
  • Database Driver & Version:

Description:

Laravel ecosystem assumes reported query time to be in milliseconds, but MongoDB package returns the time in microseconds.

Why is it an issue?
Telescope report query time is 1000x higher than what they are.
Nightwatch report query time is 1000x higher than what they are.
And basically any tool that uses query time will get the time 1000x of what it actually is because they all assume the returned time of DB::getQueryLog() to be in milliseconds.

Steps to reproduce

  1. Just enable query log
  2. Then get the query log.

Expected behaviour

returned time should be in milliseconds

Actual behaviour

returned time is in microseconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions