aboutsummaryrefslogtreecommitdiff
path: root/weed/command/benchmark.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/command/benchmark.go')
-rw-r--r--weed/command/benchmark.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/weed/command/benchmark.go b/weed/command/benchmark.go
index 4a9a9619a..8bb585d91 100644
--- a/weed/command/benchmark.go
+++ b/weed/command/benchmark.go
@@ -282,14 +282,19 @@ func readFiles(fileIdLineChan chan string, s *stat) {
start := time.Now()
var bytesRead int
var err error
- url, err := b.masterClient.LookupFileId(fid)
+ urls, err := b.masterClient.LookupFileId(fid)
if err != nil {
s.failed++
println("!!!! ", fid, " location not found!!!!!")
continue
}
var bytes []byte
- bytes, err = util.Get(url)
+ for _, url := range urls {
+ bytes, err = util.Get(url)
+ if err == nil {
+ break
+ }
+ }
bytesRead = len(bytes)
if err == nil {
s.completed++