From: Johannes Truschnigg Date: Sat, 12 Mar 2022 13:52:59 +0000 (+0100) Subject: Improve comments and error messages X-Git-Url: https://johannes.truschnigg.info/gitweb/?a=commitdiff_plain;h=5a0ef3d1381b5bfcbf4d61275c5093f38d97988c;p=sqm_lagthrottle Improve comments and error messages --- diff --git a/__lagdetect.awk b/__lagdetect.awk index 249928c..6d876e7 100644 --- a/__lagdetect.awk +++ b/__lagdetect.awk @@ -6,12 +6,12 @@ BEGIN { 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 } } @@ -33,7 +33,7 @@ BEGIN { 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)