Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean objects in a bucket should be optional #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified s3-benchmark
Binary file not shown.
8 changes: 6 additions & 2 deletions s3-benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/pivotal-golang/bytefmt"
"code.cloudfoundry.org/bytefmt"
"io"
"io/ioutil"
"log"
Expand All @@ -34,6 +34,7 @@ import (

// Global variables
var access_key, secret_key, url_host, bucket, region string
var clean_bucket bool
var duration_secs, threads, loops int
var object_size uint64
var object_data []byte
Expand Down Expand Up @@ -291,6 +292,7 @@ func main() {
myflag.StringVar(&secret_key, "s", "", "Secret key")
myflag.StringVar(&url_host, "u", "http://s3.wasabisys.com", "URL for host with method prefix")
myflag.StringVar(&bucket, "b", "wasabi-benchmark-bucket", "Bucket for testing")
myflag.BoolVar(&clean_bucket, "c", false, "clean bucket")
myflag.StringVar(&region, "r", "us-east-1", "Region for testing")
myflag.IntVar(&duration_secs, "d", 60, "Duration of each test in seconds")
myflag.IntVar(&threads, "t", 1, "Number of threads to run")
Expand Down Expand Up @@ -326,7 +328,9 @@ func main() {

// Create the bucket and delete all the objects
createBucket(true)
deleteAllObjects()
if clean_bucket {
deleteAllObjects()
}

// Loop running the tests
for loop := 1; loop <= loops; loop++ {
Expand Down