Skip to content

Commit

Permalink
user: Remove RPC latency from scanTime
Browse files Browse the repository at this point in the history
Why did I think this was a good idea?
  • Loading branch information
lukechampine committed Dec 12, 2018
1 parent 0686939 commit 823fe8f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cmd/user/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,9 @@ func scan(hostKeyPrefix string, bytes uint64, duration types.BlockHeight, downlo
return errors.Wrap(err, "could not lookup host")
}

// estimate RPC latency by calling ChainHeight
start := time.Now()
c.ChainHeight()
rpcDelay := time.Since(start)

start = time.Now()
host, err := c.Scan(hostKey)
scanTime := time.Since(start) - rpcDelay
scanTime := time.Since(start)
if err != nil {
return errors.Wrap(err, "could not scan host")
}
Expand Down

0 comments on commit 823fe8f

Please sign in to comment.