feature(ActionTimeout): add garbage collection time tracking#418
feature(ActionTimeout): add garbage collection time tracking#418maxblan wants to merge 1 commit into
Conversation
…nTimeout class This commit adds a new variable gcTime to the ActionTimeout class and subtracts it from the total time when calculating the time difference between the start and stop timestamps. The gcTime variable is calculated by iterating over the list of Garbage Collector MXBeans and summing up the collection times. This change improves the accuracy of the time tracking by accounting for the time spent in garbage collection.
|
Did not expect that this is even possible, interesting! |
|
@xeruf This seems to be interesting did you find time to test this in practice? How do you plan to test this in practice? |
|
testing it locally on cli and gui, on staging, in friendly encounters on the live system and on the probespieltage - basically we can merge this in the 2027 next branch, I just want to give it time to mature and find any issues |
|
@soerendomroes I think it is the right time now to merge this |
|
@xeruf how did you test this? Could you commit your test here? |
| private void clearGCStats() { | ||
| // With the call of `getCollectionTime` we'll clear the GarbageCollectorMXBean from older gcs. | ||
| List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); | ||
| gcBeans.forEach(GarbageCollectorMXBean::getCollectionTime); | ||
| } | ||
| } |
There was a problem hiding this comment.
Why is clearGCStats never called?
| } | ||
|
|
||
| @Override | ||
| public String toString() { |
There was a problem hiding this comment.
Why was toString removed?
This commit adds a new variable
gcTimeto theActionTimeoutclass and subtracts it from the total time when calculating the time difference between the start and stop timestamps. ThegcTimevariable is calculated by iterating over the list of Garbage Collector MXBeans and summing up the collection times. This change improves the accuracy of the time tracking by accounting for the time spent in garbage collection.These changes has not been tested, but are more a idea to be presended.