Skip to content

Commit 4c778c5

Browse files
committed
feat: Add better debugging support for low-throughput connections in throughput test (closes #3)
1 parent 72f5014 commit 4c778c5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkg/wrtcthr/wrtcthr.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ func (a *Adapter) Wait() error {
172172
for {
173173
read := 0
174174
for i := 0; i < a.config.PacketCount; i++ {
175+
if i == 0 {
176+
log.Debug().
177+
Str("channelID", peer.ChannelID).
178+
Str("peerID", peer.PeerID).
179+
Msg("Started receiving data")
180+
}
181+
175182
buf := make([]byte, a.config.PacketLength)
176183

177184
n, err := peer.Conn.Read(buf)
@@ -188,6 +195,11 @@ func (a *Adapter) Wait() error {
188195
read += n
189196
}
190197

198+
log.Debug().
199+
Str("channelID", peer.ChannelID).
200+
Str("peerID", peer.PeerID).
201+
Msg("Acknowledging received data")
202+
191203
if _, err := peer.Conn.Write(make([]byte, acklen)); err != nil {
192204
log.Debug().
193205
Err(err).

0 commit comments

Comments
 (0)