From c10ecc6d5928b3bef9e2ec39225e7315454b7561 Mon Sep 17 00:00:00 2001 From: Johannes Truschnigg Date: Sat, 19 Mar 2022 17:27:51 +0100 Subject: [PATCH] Whitespace cleanup, contd. --- __lagdetect.awk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/__lagdetect.awk b/__lagdetect.awk index 145b9fe..ad5406c 100644 --- a/__lagdetect.awk +++ b/__lagdetect.awk @@ -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 -- 2.39.5