split(PING_PEERS, pps, " ")
for (pp in pps) {
pn = pps[pp]
- print "ping peer: " pn
- slotindex[pn]=0
- have_baseline[pn]=0
- ping_avgs[pn]=-1
- ping_prev[pn]=-1
- not_increasing_count[pn]=0
+ print "PEERS+=" pn
+ slotindex[pn]=0 # used to cycle thru PINGSLOTS per PEER
+ have_baseline[pn]=0 # do we have enough data to make informed decisions?
+ ping_avgs[pn]=-1 # mean of last PINGSLOTS recorded latencies per PEER
+ ping_prev[pn]=-1 # latency recorded in the previous cycle
+ not_increasing_count[pn]=0 # number of consecutive cycles with no (fudged) latency increase
}
}
bytes=$4
lat=$6
if (! (pn in slotindex)) {
- print "BOGUS PEER: " pn
+ print "FATAL: BOGUS PEER: " pn
exit 1
}
#printf("%s %db in %.2fms\n", pn, bytes, lat)