Migrated from: MasoniteFramework/orm#945
Original author: @PrinceBlueberry
Originally opened: 2025-11-27
Original state: closed
Description
When logging queries, the execution time is misleading because it has the wrong units.
To Reproduce
- Ensure
log_queries is set to True.
- Execute a query that takes approximately one second to complete.
- Look at the logs, see something like: "Executed in 1.23ms"
Expected behavior
Should report the runtime with the correct unit (I propose seconds instead of milliseconds).
Screenshots or code snippets
N/A
Desktop (please complete the following information):
- Windows 11
- Debian GNU/Linux 11 (bullseye)
What database are you using?
- Type: SQLite
- Version 3.34.1 (inside docker)
- Masonite ORM v2.23.2
Additional context
In the source code, the underlying timer is timeit's default_timer, which the docs say will return floating point seconds (not milliseconds as is currently annotated by masonite).
Description
When logging queries, the execution time is misleading because it has the wrong units.
To Reproduce
log_queriesis set to True.Expected behavior
Should report the runtime with the correct unit (I propose seconds instead of milliseconds).
Screenshots or code snippets
N/A
Desktop (please complete the following information):
What database are you using?
Additional context
In the source code, the underlying timer is timeit's default_timer, which the docs say will return floating point seconds (not milliseconds as is currently annotated by masonite).