-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add the ability to print the startup time of each build step #10294
Conversation
@stuartwdouglas @gsmet I would like your opinion on this. Currently to enable this a user needs to set the system property both when building and when running the application, which means that under normal circumstances we don't pollute the bytecode with extra instructions, but I am pretty sure that this experience will puzzle users :). For native, obviously only the Also if we want this, it probably needs to be documented somewhere - the extension authors guide and / or the performance troubleshooting doc? |
faf55a2
to
9e81161
Compare
I think that experience will be be a bit confusing. I was thinking this could live in MainClassBuildStep, and just be abstracted into a function, so the only 'pollution' is a method call before each step (which is a noop if the property is not set). It should add basically 0 overhead. You can then store the enabled state and last step finish time in a static variable, so it should be very minimal. |
@stuartwdouglas so IIUC you want to see the control of printing of the startup times be a build time property? So if a user builds the application with that property then the startup times will always be printed when the application is run? I am thinking of another idea: Keep my initial approach, but when the application is built with the print startup times enabled, then by default it does print startup times, but you can opt-out of that behavior by setting the flag to false at runtime. How does that sound? I pushed an update that does just that |
9e81161
to
eac1ec0
Compare
No, I meant that we always include the profiling code, but just do it in a way that adds basically no overhead. |
eac1ec0
to
b64f4f1
Compare
PR updated. If you agree with the current approach, then I'll go ahead and squash the commits and take it out of draft |
b64f4f1
to
c9faf62
Compare
core/deployment/src/main/java/io/quarkus/deployment/steps/MainClassBuildStep.java
Outdated
Show resolved
Hide resolved
69398b5
to
4015a51
Compare
4015a51
to
18d66e6
Compare
Commits squashed |
|
18d66e6
to
fa70fb6
Compare
fa70fb6
to
86b9fda
Compare
@geoand Hm, what's the difference compared to the debug output from the
|
@mkouba that is for build time build steps. This PR introduces the ability to see the the time each generated startup task when you run the application |
Ah, I see. That makes sense. |
This has been discussed a couple times and I myself could have
used it when I was looking into the Flyway startup times