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

Log the time each BeanContainerListener takes #15452

Merged
merged 1 commit into from
Mar 8, 2021

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Mar 3, 2021

  • to debug perf problems during startup

- to debug perf problems during startup
@mkouba mkouba requested a review from geoand March 3, 2021 20:06
@quarkus-bot quarkus-bot bot added the area/arc Issue related to ARC (dependency injection) label Mar 3, 2021
Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

I assume you tested it and logging is available at that point in time :)

@mkouba
Copy link
Contributor Author

mkouba commented Mar 4, 2021

I assume you tested it and logging is available at that point in time :)

Hm, I did test it with a quickstart app and it seems to work just fine but I'm hopefully it does not break anything...

@dmlloyd Is it OK to use a Logger in a STATIC_INIT recorder? I went through our docs and found no mention of any similar restriction.

@dmlloyd
Copy link
Member

dmlloyd commented Mar 4, 2021

As long as you're not using the logger directly from the recorder build step method, it should be OK. Unrelatedly, you should also get in the habit of always using System.nanoTime when measuring durations, just as a matter of best practice.

@mkouba
Copy link
Contributor Author

mkouba commented Mar 4, 2021

As long as you're not using the logger directly from the recorder build step method, it should be OK.

@dmlloyd I suppose you mean directly from a @BuildStep method?

Unrelatedly, you should also get in the habit of always using System.nanoTime when measuring durations, just as a matter of best practice.

That's a good point. Although in this particular case we aim to detect problematic listeners with times around hundreds of millis.

@mkouba mkouba merged commit dbf5d5d into quarkusio:master Mar 8, 2021
@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants