Skip to content

Commit

Permalink
Don't use "objects" default when --list-existing is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
klauspost committed Jul 23, 2024
1 parent 6e4fb3f commit 4eee35b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ func mainDelete(ctx *cli.Context) error {
ListFlat: ctx.Bool("list-flat"),
ListPrefix: ctx.String("prefix"),
}
if b.ListExisting && !ctx.IsSet("objects") {
b.CreateObjects = 0
}
return runBench(ctx, &b)
}

Expand Down
3 changes: 3 additions & 0 deletions cli/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func mainGet(ctx *cli.Context) error {
ListFlat: ctx.Bool("list-flat"),
ListPrefix: ctx.String("prefix"),
}
if b.ListExisting && !ctx.IsSet("objects") {
b.CreateObjects = 0
}
return runBench(ctx, &b)
}

Expand Down
1 change: 1 addition & 0 deletions yml-samples/delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ warp:

# Instead of preparing the bench by PUTing some objects,
# only use objects already in the bucket.
# If 'objects' is set > 0 this will limit the number of objects.
# Does not perform any deletes before or after benchmark.
list-existing: false

Expand Down
1 change: 1 addition & 0 deletions yml-samples/get.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ warp:

# Instead of preparing the bench by PUTing some objects,
# only use objects already in the bucket.
# If 'objects' is set > 0 this will limit the number of objects.
# Does not perform any deletes before or after benchmark.
list-existing: false

Expand Down

0 comments on commit 4eee35b

Please sign in to comment.