Skip to content

Commit

Permalink
fix percentage logging during bulk sends
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann committed May 13, 2021
1 parent ff66a31 commit 4fb082c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fullrt/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ func (dht *FullRT) bulkMessageSend(ctx context.Context, keys []peer.ID, fn func(
for _, key := range chunk {
sendsSoFar := atomic.AddUint64(&numSends, 1)
if sendsSoFar%onePctKeys == 0 {
logger.Infof("bulk sending goroutine: %v pct done - %d/%d done", sendsSoFar/uint64(len(sortedKeys)), sendsSoFar, len(sortedKeys))
logger.Infof("bulk sending goroutine: %v pct done - %d/%d done", float64(sendsSoFar)/float64(len(sortedKeys)), sendsSoFar, len(sortedKeys))
}
if err := fn(ctx, key); err != nil {
var l interface{}
Expand Down

0 comments on commit 4fb082c

Please sign in to comment.