Skip to content

Commit

Permalink
add timestamps to prints
Browse files Browse the repository at this point in the history
  • Loading branch information
samiemostafavi committed Jan 5, 2024
1 parent d359793 commit fcecd12
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions irtt_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,19 +592,24 @@ func (c *clientHandler) OnReceived(seqno Seqno, rtd *RoundTripData,
}
}
rd := ""
rt := ""
if rtd.ReceiveDelay() != InvalidDuration {
rd = fmt.Sprintf(" rd=%s", rdur(rtd.ReceiveDelay()))
rt = fmt.Sprintf(" rt=%d", rtd.Client.Receive.Wall)
}
sd := ""
st := ""
if rtd.SendDelay() != InvalidDuration {
sd = fmt.Sprintf(" sd=%s", rdur(rtd.SendDelay()))
st = fmt.Sprintf(" st=%d", rtd.Client.Send.Wall)
}
sl := ""
if late {
sl = " (LATE)"
}
printf("seq=%d rtt=%s%s%s ipdv=%s%s", seqno, rdur(rtd.RTT()),
rd, sd, ipdv, sl)

printf("seq=%d rtt=%s%s%s%s%s ipdv=%s%s", seqno, rdur(rtd.RTT()),
rd, sd, rt, st, ipdv, sl)
}
}
}
Expand Down
Binary file modified nlmt
Binary file not shown.
9 changes: 7 additions & 2 deletions sconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,15 +592,20 @@ func (sc *sconnHandler) OneWayOnReceived(seqno Seqno, owtd *OneWayTripData,
}
}
sd := ""
rt := ""
st := ""
if owtd.SendDelay() != InvalidDuration {
sd = fmt.Sprintf(" sd=%s", rdur(owtd.SendDelay()))
st = fmt.Sprintf(" st=%d", owtd.Client.Send.Wall)
rt = fmt.Sprintf(" st=%d", owtd.Server.Receive.Wall)
}
sl := ""
if late {
sl = " (LATE)"
}
printf("[%s] seq=%d %s ipdv=%s%s", sc.raddr, seqno,
sd, ipdv, sl)

printf("[%s] seq=%d %s%s%s ipdv=%s%s", sc.raddr, seqno,
sd, st, rt, ipdv, sl)
}
}
}
Expand Down

0 comments on commit fcecd12

Please sign in to comment.