-
Notifications
You must be signed in to change notification settings - Fork 161
Fixes in monitoring, enable monitoring in Embedded GlassFish #25752
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
base: master
Are you sure you want to change the base?
Fixes in monitoring, enable monitoring in Embedded GlassFish #25752
Conversation
28dd44c to
0a14238
Compare
...us/flashlight/framework/src/main/java/org/glassfish/flashlight/provider/FlashlightProbe.java
Outdated
Show resolved
Hide resolved
4575b83 to
dc4c6e7
Compare
307b54a to
f8b7383
Compare
143f041 to
cdcbcdc
Compare
…eted Print an exception at the end rather than for each file separately
Use only for temp dir. If used for workspace, we run out of space. Drive D is already used for workspace. See why D and RAM disks should be used: https://www.chadgolden.com/blog/github-actions-hosted-windows-runners-slower-than-expected-ci-and-you#windows-dev-drive--virtual-hard-disk-vhdx
It gets stuck for some reason and then the job is killed after 6 hours.
- Special matcher - Deleting temporary files - Removed LONG_RUNNING tag from monitorngtest - finishes around 2 seconds. Instead I tried to stabilize the host resolution which seems to make problems on windows (looks like JDK bug?) Signed-off-by: David Matějček <[email protected]>
297161f to
07c0830
Compare
This reverts commit fd765a9.
Signed-off-by: David Matějček <[email protected]>
.github/workflows/build-linux.yml
Outdated
| on: | ||
| pull_request: | ||
| branches: [ "master", "7.0", "8.0" ] | ||
| permissions: |
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.
Is this required, unlike in other workflows?
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.
First idea was that the windows container is so slow, so Ondro tried to find some solution to improve its performance using ram disks etc. Now I am slowly fixing some problematic code pieces and adding logs to find out why the execution just times out after several hours and just with Windows GHA container.
I will try to run that yet on Windws Server 25 in VirtualBox for sure, because this is really awful behavior, looks like some black hole network communication.
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.
My question is for
permissions:
checks: writeI've seen commit with that setting being removed (undone) from other workflow files, but it's still in linux one.
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.
I think @dmatej you reverted too much in this commit: 3fb9a43
I added
permissions:
checks: write
for the action-junit-report step, although I added it with a commit that only mentions adding RAM disk. Though it seems that have this permission block doesn't have any effect.
I don't understand how the action-junit-report exactly works. Now I tried to enable annotation-only mode, hopefully it will provide us what I seek for - information about which tests fail if some tests fail. Right now, this step only provides the number of passed and failed tests.
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.
It is a work in progress, I will go over those commits later one by one and move some changes to own PR. First I need to understand what is really happening and why the build freezes just on GHA.
Signed-off-by: David Matějček <[email protected]>
ee88819 to
3b12636
Compare
0382c18 to
3a940a2
Compare
Not to change the action status as we don't need it and it requires elevated permissions. Enable more info for the test report, not just summary
3a940a2 to
05060d9
Compare
2357ee7 to
4dcd2d6
Compare
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
- Partially removed printing stacktraces when we throw after that
- AMXConfigLoader - refactoring
- condition was always true, and we could move some code to constructor
to make it more visible
- synchronization was not useful here, the code is synchronized
from the outside too
- Formatting, blank lines, annotations
- Throwing "unreachable" exceptions instead of swallowing them
Signed-off-by: David Matějček <[email protected]>
|
Status: I have rebased #25768 to this, fixed conflicts (I made them). Now I will create another PR just with Ondro's changes in GHA, then I will rebase again, I will try yet to improve the performance of those new tests in application-tests, so we could avoid those tags. I have a new weapon for that, learned new usages of the Stream API :-) Otherwise, nothing new about Jenkins performance, unfortunately. |
Ensures that the reported current thread count and busy thread count is exactly the number of threads reported by the pool. Even if monitoring is started while thread pool is actively processing requests.
A few improvements in Embedded GlassFish to enable monitoring and access it via JMX (it was completely broken before):
probe-provider-class-namesMANIFEST elements from dependencies, using gmaven plugin script at build time. It references all probes that should be activatedEmbedded GlassFish requires running with flashlight-agent on command line with -javaagent:flashlight-agent.jar on newer Java versions as it doesn't contain the agent. Dynamic loading of agent is not a good practice with newer Java versions anyway.
When started with command "enable-monitoring --mbean true", metric will be available via JMX beans:
Example to start Embedded GlassFish with thread pool and http service metrics:
Or, alternatively, using the following properties in
glassfish.propertiesin the current directory:And command:
Then in VisualVM (with MBeans extension), in the
amxnode:If you don't see the
amxnode, you need to execute thebootAMXoperation from VisualVM first (the added test demonstrates how to do that in code):