From 4eee35b3db7845903034b5a9acd10e262b551d45 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Tue, 23 Jul 2024 13:48:48 +0200 Subject: [PATCH] Don't use "objects" default when --list-existing is used. --- cli/delete.go | 3 +++ cli/get.go | 3 +++ yml-samples/delete.yml | 1 + yml-samples/get.yml | 1 + 4 files changed, 8 insertions(+) diff --git a/cli/delete.go b/cli/delete.go index f5d486b8..afc5686f 100644 --- a/cli/delete.go +++ b/cli/delete.go @@ -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) } diff --git a/cli/get.go b/cli/get.go index 318eddeb..624cea70 100644 --- a/cli/get.go +++ b/cli/get.go @@ -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) } diff --git a/yml-samples/delete.yml b/yml-samples/delete.yml index a6737ba3..777382c8 100644 --- a/yml-samples/delete.yml +++ b/yml-samples/delete.yml @@ -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 diff --git a/yml-samples/get.yml b/yml-samples/get.yml index 36bce56d..cb5aa58f 100644 --- a/yml-samples/get.yml +++ b/yml-samples/get.yml @@ -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