-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fixes calculation of average thread blocked time and average thread waited time #118
Fixes calculation of average thread blocked time and average thread waited time #118
Conversation
Thanks for making this change.
From java documentation,
|
8f914a4
to
be87f54
Compare
7883f30
to
e4656c5
Compare
Codecov Report
@@ Coverage Diff @@
## main #118 +/- ##
============================================
- Coverage 72.03% 71.97% -0.07%
- Complexity 2945 2955 +10
============================================
Files 376 376
Lines 18723 18853 +130
Branches 1432 1468 +36
============================================
+ Hits 13488 13570 +82
- Misses 4648 4697 +49
+ Partials 587 586 -1
Continue to review full report at Codecov.
|
null/data/batch_metrics_enabled.conf
Outdated
@@ -0,0 +1 @@ | |||
true |
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.
Can we remove these null/*/*.conf
files? They are generated during test execution. Maybe adding null/*
to .gitignore
will help avoid these issues in the future.
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.
ack
@@ -0,0 +1 @@ | |||
true |
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.
same as above
if (threadBean.isThreadContentionMonitoringSupported()) { | ||
threadBean.setThreadContentionMonitoringEnabled(threadContentionMonitoringEnabled); | ||
} |
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.
This check and set happens during every OSMetricsCollector#collectMetrics
call which is very frequent. Do we want to set it once during initialization and when there is state change in threadContentionMonitoringEnabled
?
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.
This check is not very costly
If the flag is already enabled then this short-circuits out of the method without doing anything.
if (contentionMonitoringEnabled != enable) {
if (enable) {
// if reeabled, reset contention time statistics
// for all threads
resetContentionTimes0(0);
}
// update the VM of the state change
setThreadContentionMonitoringEnabled0(enable);
contentionMonitoringEnabled = enable;
}
Also, the OSMetricsCollector is initialized in the PA Plugin. We can't do a set once and update on state change sort of thing from there as ThreadList.getNativeTidMap is a static call and will need to know thread contention monitoring is enabled or not before every run.
Flaky Looks like Integration tests are failing in |
8f491ed
to
4633ee0
Compare
Integration tests are failing in main as well. |
…read blocked time and average thread waited time Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
4633ee0
to
40cc6b0
Compare
Approving. Integ test failing due to known failure which was fixed recently and seems like this PR didn't pull that latest commit. |
Signed-off-by: Surya Sashank Nistala snistala@amazon.com
Issues resolved
#92
Testing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.