dvassallo / s3-benchmark

Measure Amazon S3's performance from any location.
MIT License
822 stars 133 forks source link

Misleading name/description of payload parameter #10

Open smedelyan opened 5 years ago

smedelyan commented 5 years ago

It says:

The minimum object size to test, with 1 = 1 KB

I had to look through the code to understand that "payload" is a power of 2 which is then multiplied by 1KB. So, in short:

# assuming payload is > 0
multiplier = 2 ^ (payload - 1)
object_min_size = 1KB * multiplier

So, you see, you have to pass -payload-min=16 to get 32 MB object, and -payload-min=17 to get 64 MB object while the parameter clearly says it is an object size. Why is it encoded in such a weird way then?

Same applies to payload-max. I suggest either renaming this parameter to something better corresponding to the actual meaning, or - even better - allow user to define object min and max size like:
-payload-min=1000 - meaning 1 MB