mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-09 20:37:52 +00:00
number of sent messages is just i silly
This commit is contained in:
parent
adf3e528f5
commit
27515a3f98
1 changed files with 2 additions and 3 deletions
|
|
@ -722,9 +722,8 @@ func (s *Server) Open() error {
|
|||
|
||||
if now := time.Now(); now.Sub(prevMsg) > time.Second {
|
||||
progressRatio := float64(i+1) / float64(len(toSend))
|
||||
numSentMessages := len(toSend) - (i + 1)
|
||||
messagesLeft := len(toSend) - numSentMessages
|
||||
avgTimePerMessage := float64(now.Sub(start)) / float64(numSentMessages)
|
||||
messagesLeft := len(toSend) - i
|
||||
avgTimePerMessage := float64(now.Sub(start)) / float64(i)
|
||||
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