-
Notifications
You must be signed in to change notification settings - Fork 121
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
Correctly log elapsed milliseconds in CentralDogmaBeanFactory
#991
Correctly log elapsed milliseconds in CentralDogmaBeanFactory
#991
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Separately, we probably need to fix our CI 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👍 👍 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! 👍👍
@@ -328,7 +328,7 @@ public <T> T get(T defaultValue, Class<T> beanType, Consumer<T> changeListener, | |||
throw ex; | |||
} | |||
} | |||
final long elapsedMillis = System.nanoTime() - t0; | |||
final long elapsedMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - t0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😱
@KarboniteKream 👍 👍 👍 |
Motivation:
When the elapsed time in
CentralDogmaBeanFactory#get()
is logged, it prints nanoseconds withms
unit.Modifications:
Result:
The logs correctly display the elapsed time of obtaining the initial value.