Closed redink closed 6 years ago
I added a way for test the hibernate, I have no idea but only this one.
If you have better one, give me help please. Thanks.
@redink we could read the memory in the callback and send it in the message to the test process and then in a recursive loop wait for it to go down. Alternatively in a similar recursive loop we could wait for the Process.info(self(), current_function)
to change to the appropriate function.
We should consider limiting the loop by a time limit using System.monotonic_time
. Also we could sleep between each check to allow other processes to run.
@redink I left some comments: the main takeaway is that the timer is for idling
and for hibernating
. The hibernation occurs after the idle handling (calling the ping callback), and it is possible we won't hibernate. The new option is to go idle after we ping or after we fail to connect.
sojourn
test still have problem, I will work on it later.
@redink the last changes look good. It might be that Sojourn
doesn't play well with hibernate because of how the pool works. I suggest we don't implement hibernate for it yet and add the @idle_hibernate tag for sojourn tests.
Hello, Any updates ? Or any more comments ?
@redink there is a performance regression so need to look in it.
Closing in favor of #108.
from #101