Skip to content
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

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

KarboniteKream
Copy link
Contributor

@KarboniteKream KarboniteKream commented Jul 22, 2024

Motivation:

When the elapsed time in CentralDogmaBeanFactory#get() is logged, it prints nanoseconds with ms unit.

Modifications:

  • Convert the elapsed time to milliseconds before logging.

Result:

The logs correctly display the elapsed time of obtaining the initial value.

Copy link
Contributor

@jrhee17 jrhee17 left a 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 🙇

@jrhee17 jrhee17 added the defect label Jul 23, 2024
@jrhee17 jrhee17 added this to the 0.67.1 milestone Jul 23, 2024
Copy link
Contributor

@minwoox minwoox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍 👍 👍

Copy link
Contributor

@ikhoon ikhoon left a 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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱

@minwoox minwoox merged commit 086ea09 into line:main Jul 23, 2024
9 of 10 checks passed
@minwoox
Copy link
Contributor

minwoox commented Jul 23, 2024

@KarboniteKream 👍 👍 👍

@minwoox minwoox modified the milestones: 0.67.1, 0.68.0 Jul 23, 2024
@KarboniteKream KarboniteKream deleted the fix/bean-factory-elapsed-millis branch July 23, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants