]> johannes.truschnigg.info Git - sqm_lagthrottle/commitdiff
Whitespace cleanup, contd.
authorJohannes Truschnigg <johannes@truschnigg.info>
Sat, 19 Mar 2022 16:27:51 +0000 (17:27 +0100)
committerJohannes Truschnigg <johannes@truschnigg.info>
Sat, 19 Mar 2022 16:27:51 +0000 (17:27 +0100)
__lagdetect.awk

index 145b9fea6bd5cb36a5a558b2dab6981beabab07d..ad5406cefc6d7d254be7c56bd67829c822ce2f85 100644 (file)
@@ -107,7 +107,7 @@ function slice_bw_window_rx(bw_lower_bound_rx, bw_upper_bound_rx) {
 function update_ts() {
   ts = get_time()
   ts_delta = ts - ts_old
-  if( ts_delta < update_bw_min_delta ) {
+  if (ts_delta < update_bw_min_delta) {
     # Let caller know that not much time has passed since the last update,
     # so maybe not waste time with useless calculations in the face of very
     # little actual change.
@@ -224,7 +224,7 @@ function adjust_sqm(peername, latency) {
   # Try to determine a latency trend over the last few samples
   last2avg = (((ping_prev[peername] + latency) / 2.0))
   thresh_fudged = (FUDGE + (ping_avgs[peername] * THRESHOLD))
-  if (last2avg > thresh_fudged ) {
+  if (last2avg > thresh_fudged) {
     if (latency > ping_prev[peername] && latency > ping_pprev[peername]) {
       if (rx_rate < (rx_rate_max * 0.1)) { # XXX TODO is this correct?
         print "# " ts " line does not appear to be loaded, skipping futile SQM bw downgrade"
@@ -276,7 +276,7 @@ function update_pingstats(peername, latency) {
   slotindex[peername]++
   pingslot = peername ":" slotindex[peername]
   pingstats[pingslot] = latency
-  if(slotindex[peername] % PINGSLOTS == 0) {
+  if (slotindex[peername] % PINGSLOTS == 0) {
     if (have_baseline[peername] == 0) {
       have_baseline[peername] = 1
       print "# READY PEER: " peername