Skip to content

Commit

Permalink
Remove lock
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-soltesz committed Jan 12, 2024
1 parent 5cfdc8f commit 4c096a1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions cmd/minimal-download/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,7 @@ outer:
formatMessage("Download server", 1, m)
case streamCount > 1 && stream == 0:
// Only do this for one stream.
s.mu.Lock()
elapsed := time.Since(s.firstStartTime)
s.mu.Unlock()
log.Printf("Download client #1 - Avg %0.2f Mbps, MinRTT %5.2fms, elapsed %0.4fs, application r/w: %d/%d\n",
8*float64(s.bytesTotal.Load())/1e6/elapsed.Seconds(), // as mbps.
float64(s.minRTT.Load())/1000.0, // as ms.
Expand Down

0 comments on commit 4c096a1

Please sign in to comment.