- Notifications
You must be signed in to change notification settings - Fork 327
Only time type/method matching if the debug logging is enabled #2471
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
Only time type/method matching if the debug logging is enabled #2471
Conversation
… results are only used when debug logging is enabled.
| 👋 @tobiasstadler Thanks a lot for your contribution! It may take some time before we review a PR, so even if you don’t see activity for some time, it does not mean that we have forgotten about it. Every once in a while we go through a process of prioritization, after which we are focussing on the tasks that were planned for the upcoming milestone. The prioritization status is typically reflected through the PR labels. It could be pending triage, a candidate for a future milestone, or have a target milestone set to it. |
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java Outdated Show resolved Hide resolved
| Thanks for proposing this @tobiasstadler . Do you have any measurement as to what this metric collection actually adds? I'd expect it to be extremely cheap, so mush so that it wouldn't worth this change, but if really saves something it makes sense. In addition, |
| I did an unscientific experiment. I started my JBoss EAP together with some wars and looked at the time difference between the first and last line containing |
| If that's a consistent thing, we may need to see why that is, but I highly doubt this difference comes only from the updates of these metrics. Did you try to repeat it a few times? |
| Yes, I did restart the server a couple of times. The non measuring start was always a little bit faster. |
| I will try a non JBoss application tomorrow. |
| I did a couple of runs with a non JBoss Application and non measuring the instrumentation was about 1s faster (around 9s compared to 10s). |
| what is your clock source? |
eyalkoren left a comment
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 for providing more insights @tobiasstadler 🙏
I didn't estimate the clock query overhead as so impactful.
In that case, we should definitely apply this optimization!
Let me know if you want to apply the style change that you proposed, I think it makes sense.
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java Outdated Show resolved Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java Outdated Show resolved Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java Outdated Show resolved Hide resolved
| /test |
Standard Mac Book Pro from 2018 (no VM). Do you need to know anymore specific? |
| /test |
| run elasticsearch-ci/docs |
eyalkoren left a comment
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!
| Thank You! |
What does this PR do?
Increase matching performance when debug logging is not enabled.
Checklist