feature(ActionTimeout): add garbage collection time tracking#418
feature(ActionTimeout): add garbage collection time tracking#418maxblan wants to merge 3 commits 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? |
|
Hi, I logged the values , and the gcTime is never reset. |
| this(canTimeout, DEFAULT_HARD_TIMEOUT, DEFAULT_SOFT_TIMEOUT); | ||
| } | ||
| private static final int DEFAULT_HARD_TIMEOUT = 10000; | ||
| private static final int DEFAULT_SOFT_TIMEOUT = 5000; |
There was a problem hiding this comment.
@xeruf is there a reason that the default soft-timeout is 5 seconds instead of 2?
There was a problem hiding this comment.
Is it such that the advanced player cannot run into a timeout? Since it may take more than 2 seconds in the current implementation? software-challenge/gui#121
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.