Skip to content

Commit

Permalink
Update output formatting (remove cur, make it fixed width to some ext…
Browse files Browse the repository at this point in the history
…ent).
  • Loading branch information
notsure2 committed Feb 19, 2022
1 parent dcc14b1 commit e55351c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions cmd/cake-autorate/cake-autorate.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,16 +360,25 @@ func main() {
downloadRateKilobits = nextDownloadRateKilobits
uploadRateKilobits = nextUploadRateKilobits

loss := 0
if pingReply.PacketsLost {
loss = 1
}

spike := 0
if rttIsSpiking {
spike = 1
}

if !*beQuiet {
log.Printf(
"r%%: %d; t%%: %d; base: %.2fms; cur: %.2fms; delta: %.2fms; spike: %v; loss: %v; d: %dKbit; u: %dKbit;\n",
"r%%: %3d; t%%: %3d; base: %3.0fms; delta: %3.0fms; spike: %d; loss: %d; d: %dKbit; u: %dKbit;\n",
rxLoad,
txLoad,
baselineRtt,
float64(newRtt.Milliseconds()),
rttDelta,
rttIsSpiking,
pingReply.PacketsLost,
spike,
loss,
nextDownloadRateKilobits,
nextUploadRateKilobits)
}
Expand Down

0 comments on commit e55351c

Please sign in to comment.