-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misleading label for query duration: "duration_μs" #5
Comments
good catch. i must have misunderstood the |
Well, I can open a PR to replace
mmm, interesting, never thought about it like that, but we "could" consider using a $d1=new DateTime("2012-07-08 11:14:15.638276");
$d2=new DateTime("2012-07-08 11:14:15.889342");
$diff=$d2->diff($d1);
print_r( $diff ) ; DateInterval Object
(
[y] => 0
[m] => 0
[d] => 0
[h] => 0
[i] => 0
[s] => 0
[f] => 0.251066
[weekday] => 0
[weekday_behavior] => 0
[first_last_day_of] => 0
[invert] => 1
[days] => 0
[special_type] => 0
[special_amount] => 0
[have_weekday_relative] => 0
[have_special_relative] => 0
) Only the question then still stands: how to "represent" this, |
i agree. regarding the new label, i'd prefer some indication of units instead of simply your DateInterval idea is very interesting to me. i would prefer to move to objects for managing date math and formatting anyway and we can certainly do that later. currently, this lib can be installed on php 7.0 so i'll schedule an overdue routine version bump and look into it at that time. regarding interval formatting, there is a format function which i think we can use to reproduce the e.g.
|
fixes(#5): duration is expressed in seconds, not microseconds
resolved by #11 |
Currently the label used for query duration is
duration_μs
:doctrine-psr-sql-logger/src/PsrSqlLogger.php
Line 70 in 5398557
For me
μs
suggests that the value is indicated in microseconds, also see https://en.wikipedia.org/wiki/MicrosecondHowever, the value itself is indicated in seconds, only the level of detail is in microseconds.
So I would expect the label to be:
duration_s
, or simplyduration
...Maybe a bit nitpicking 😉 , but it might be something to think about.
The text was updated successfully, but these errors were encountered: