...
Im trying to figure out a way *if possible at all ** to track pool reply times / stratum get_work response times - if, for example, it takes grater than >100ms from current pool port But at the same time whilst tracking ping reply from the other pool ports are <100ms =40ms (faster) then get the miner to switch to the faster pool port to continue mining.
..in a nutshell monitor real-time (or on average) pool ping/latency times..
My observations is that during the late evening /early hrs morning (my time) they deprioritize traffic coming from .EU region and ping times climb, Then when they have more activity over in .ch time pings drop. along these lines, similar to that effect.
I haven't manged to track all their ports in-depth but cursory observations confirm this.
To date the best way I have to do this is to restart the miner on the new port when I see my stales counts climb.
But since this requires me to monitor rig console then it can be inefficient as I do need some sleep

Perhaps a way to look at this is to track the stale's report count and if it goes over the set threshold then trigger miner to swap ports.. As opposed to actually tracking stratum-ping times with hat utility i posted a few pages back in this thread maybe this could be one approach to skin the same cat sort of speak.
interested to get feedback/suggestions/tip's/ideas.
cheers