mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 23:31:03 +00:00
off by one error fixed
This commit is contained in:
parent
27515a3f98
commit
7102de9f60
1 changed files with 2 additions and 2 deletions
|
|
@ -722,8 +722,8 @@ func (s *Server) Open() error {
|
|||
|
||||
if now := time.Now(); now.Sub(prevMsg) > time.Second {
|
||||
progressRatio := float64(i+1) / float64(len(toSend))
|
||||
messagesLeft := len(toSend) - i
|
||||
avgTimePerMessage := float64(now.Sub(start)) / float64(i)
|
||||
messagesLeft := len(toSend) - (i + 1)
|
||||
avgTimePerMessage := float64(now.Sub(start)) / float64(i+1)
|
||||
timeRemaining := time.Duration(avgTimePerMessage * float64(messagesLeft))
|
||||
s.logger.Printf("synced %d/%d messages (%.2f%% complete; %s remaining)", i+1, len(toSend), 100*progressRatio, timeRemaining)
|
||||
prevMsg = now
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue